[Libwebsockets] How to get socket id from incoming request ?

Suman.Patro-TRN Suman.Patro-TRN at lntebg.com
Tue Jun 21 07:26:35 CEST 2016


Hello Meir,

To get wsi pointer of each client connection request , you could return context->pt->fds->fd from a method that returns a SOCKET id .My answer is completely windows-specific and have no idea about socket.io. But if your requirement is to get socket ids of each web client connection requests and map those at the server end for using those socket ids to send reply messages to the connected clients, this method should work. Mine works properly.The solution is for libwebsockets master version.

Thanks and regards,

Suman

Larsen & Toubro Limited

www.larsentoubro.com

This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20160621/7779b088/attachment-0001.html>


More information about the Libwebsockets mailing list