|
From: | address@hidden |
Subject: | Re: [lwip-users] How to force-close a netconn from the server side? |
Date: | Wed, 25 Jan 2017 20:49:37 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
Freddie Chopin wrote:
[..] Is there any other way than direct messing with the tcp_pcb to set SOF_REUSEADDR in the so_options field? Maybe I'm doing something wrong here (except force-closing the client connections (; )?
In "specialities" like this one, the netconn API is (unfortunately) sometimes incomplete as the "core" and socket APIs are more widely used.
While you don't have to "mess" with the "so_options" field, you'd have to call "ip_set_option(conn->pcb.ip, optname)", which should work for you but is still not a clean solution as accessing the "pcb" member of a netconn should not be done by client code and should not be done from an application thread (only from tcpip_thread).
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |