[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] question about netconn_write
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] question about netconn_write |
Date: |
Sat, 13 Dec 2008 14:15:24 +0000 |
On Sat, 2008-12-13 at 21:59 +0800, yueyue papa wrote:
> Thanks
>
> Based on your suggtion,
>
> I tried to add a lwip_tcpflush(int s)
>
> int lwip_tcpflush(int s)
> {
> struct lwip_socket *sock;
> sock = get_socket(s);
> if (!sock)
> return -1;
> return tcp_output(sock->conn.pcb.tcp);
> }
>
> Will it force data flush ?
Yes, but you've completely broken the threading protection: the sockets
code can't access the internal functions of lwIP directly, they must use
a message to invoke an action in the tcpip thread.
Kieran