LwIP netconn problem s bind()
Jaroslav Buchta
jaroslav.buchta na hascomp.cz
Sobota Květen 3 21:53:23 CEST 2014
Me se povedlo cca 5MB/s pres UDP prumer, ono teoreticke maximum 100Mb
site nebude uz daleko...
Dne 3. 5. 2014 21:50, Stano napsal(a):
> Dakujem za odpovede.
> Este by som mal jednu otazku. Aku rychlost prenosu mam povazovat za
> normalnu? Mam STM32F407 a davam len cca 3MBs co sa mi zda velmi velmi
> malo.
>
> Martin Persich wrote / napísal(a):
>> Dobrý den,
>> zkuste:
>> ------------------------
>> struct netconn *pxListener;
>>
>> pxListener = netconn_new( NETCONN_TCP ); // Create a new tcp
>> connection handle
>>
>> if(pxListener!=NULL) {
>>
>> pxListener->pcb.tcp->so_options|=(SOF_REUSEADDR);
>> netconn_bind(pxListener, NULL, TELNET_PORT );
>> netconn_listen( pxListener );
>> ....
>> }
>> ------------------------
>>
>> Martin. persich na transcon.cz
>>
>>
>> ----- Original Message ----- From: "d.petr" <d.petr na post.cz>
>> To: "HW-news" <hw-list na list.hw.cz>
>> Sent: Friday, May 02, 2014 3:08 PM
>> Subject: Re: LwIP netconn problem s bind()
>>
>>
>> Stano wrote:
>>> Otvori to TCP port a caka na spojenie, ked sa prenesu data port sa
>>> zatvori a connection sa maze.
>>> Problem je v tom ze po zmazani uz 2hy krat netconn_bind() nevrati OK
>>> Docital som sa na strankach LwIP:
>>> "Bind a netconn to a local IP address or to any IP address. Note
>>> that if
>>> you try to bind the same address and/or port you might get an error
>>> (ERR_USE, address in use), even if you delete the netconn. Only after
>>> some time (minutes) the resources are completely cleared in the
>>> ...
>>> Vie niekto poradit ako tento problem spravne vyriesit? Napada ma
>>> nastavit velmi maly timeout ale to mi pride ako velmi spinave riesenie.
>>>
>>> S pozdravom
>>> Stano
>>
>> Normálně se to dá řešit po vytvoření soketu:
>> int optval=1;
>> setsockopt (*Socket, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval);
>>
>> Podívejte se po ekvivalentu.
>> PM
>> _______________________________________________
>> HW-list mailing list - sponsored by www.HW.cz
>> Hw-list na list.hw.cz
>> http://list.hw.cz/mailman/listinfo/hw-list
>>
>>
>>
>> _______________________________________________
>> HW-list mailing list - sponsored by www.HW.cz
>> Hw-list na list.hw.cz
>> http://list.hw.cz/mailman/listinfo/hw-list
>
> _______________________________________________
> HW-list mailing list - sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list
Další informace o konferenci Hw-list