|
From: | 陳 小擁 |
Subject: | Re: Re: Re: Re: [lwip-users] Can't send the data by Raw API |
Date: | Thu, 16 Feb 2006 19:34:17 +0800 (CST) |
Take a look at the doc/rawapi.txt document in the lwip installation area. This has all the functions that you would need for writing TCP and UDP applications.
Here is a snippet of a function that sends data.
err_t err = ERR_OK;
u16_t len;
/* We cannot send more data than space available in the send
buffer. */
if (tcp_sndbuf(pcb) < ps->left) {
len = tcp_sndbuf(pcb);
} else {
len = ps->left;
}
if (len > 0) {
err = tcp_write(pcb, ps->buf_p, len, 1);
}
Sathya
_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
[Prev in Thread] | Current Thread | [Next in Thread] |