lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] netconn_accept


From: address@hidden
Subject: Re: [lwip-users] netconn_accept
Date: Thu, 29 Mar 2012 19:16:06 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120313 Thunderbird/11.0

Sirjee Rooplall wrote:
Under freeRTOS I have created 3 Tasks, each of the Tasks, bind and listen for a connection on port 1234.

That's not a problem in netconn_accept(): netconn_bind() will have returned an error before, as only one netconn (or pcb or socket, that doesn't depend on the API used or even the IP stack used) can bind to a port at a time. That's because TCP connections have to be uniquely identified by local address+port, remote address+port; a listening pcb does not have remote address+port and can thus cannot be uniquely identified if there's a second listening connection on the same port.

You'd have to create one central accepting thread that passes incoming connections to other threads to solve this.

Simon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]