[Libwebsockets] Error 98 on binding port (Nios II)

Simone Maccanti simonemacc at gmail.com
Wed Apr 2 15:12:17 CEST 2014

Yep you are right.
#netstat shows the port 55554 still in status LISTEN... after i killed the
server, interesting.

2014-04-01 18:39 GMT-04:00 Andy Green <andy at warmcat.com>:

> On 04/02/2014 04:24 AM, Simone Maccanti wrote:
>> Hello guys.
>> First of all thanks for this great library!
>> I'm trying to port libwebsockets to uCLinux (Board with Nios II) for use
> Cool, this kind of platform is what I originally had in mind for very
> resource-constrained and unthreaded case for lws.
>  Websockets and speed up some data published by the Board web page... so
>> I'm doing some experiments. I've built the lib and everything seems
>> fine, then i've build a simple server using Test-server.c for try to
>> communicate to a simple web page.
>> The default port is the 55554 instead of 7681, but every time i start
>> the server (Test-server.c) libwebsocket_create_context fails with error
>> 98 (bind: Address already in use). Starting the server with another port
>> (using the option --port) for example 55555, works.
>> The 55554 is not used of course and i can change it with another port:
>> same results, it fails.
>> Seems an issue about how the socket is open and only the first time.
>> Any idea?
> If you look with netstat -pln after running and killing the server the
> first time, you may see the listen port in TIME_WAIT state still.
> lws changes the listen socket attribute to allow treading on that with a
> subsequent session listening on the same socket, but it seems that is
> broken on uclinux somehow.
> -Andy
>  Thanks.
>> _______________________________________________
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140402/fd98a158/attachment-0001.html>

More information about the Libwebsockets mailing list