[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] FreeRTOS / lwip multiple connections
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] FreeRTOS / lwip multiple connections |
Date: |
Tue, 30 Aug 2011 16:18:37 +0100 |
On Tue, 2011-08-30 at 14:04 +0000, vincent cui wrote:
> Deal with mult-connection correctly, there is 3 way.
There are lots of ways!
> 3. Using socket, you must set it with non-blocking and select it
>
> I use the 3th method. The following code must be add to listen socket.
>
>
> Int arg = 0x1;
>
> lwip_ioctl(listhensocket, FIONBIO, &arg);
I'm not sure why you need your listening socket to be non-blocking.
> but I found that the listen socket cann’t work once it is set with
> nonblocking…
> now, I remove it, it works … hope someone explain why
I'm not sure if lwIP supports non-blocking listening sockets. I'd have
to check the source to be sure and I'm short on time.
> other, you also need call lwIP_shutdown and lowip_close to terminate
> socket in order to be avoid to CLOSE_WAIT .
No, either should be fine if you use them correctly. There are some
small differences between lwIP's shutdown and close and standard
shutdown and close, but we're working towards getting them more
standardised where possible.
Kieran