Am 19.11.2021 um 22:55 schrieb Grant Edwards:
After accepting a tcp connection with netconn_accept(listenconn, &newconn), how does one set the callback function for newconn?
The callback gets copied from the listening connection. While it would probably not be a big problem to change the netconn->callback member at that point, it's not currently implemented. However, there would be a race condition: the callback may be called right after accepting the underlying connection, but before an application thread has pulled the new connection out of the listener's acceptmbox. So there might be a time span where the underlying TCP connection can receive data but you wouldn't have changed the callback yet. Being like that, we live with having one callback for all types of connections in the socket layer. Regards, Simon _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users