Hi Alexander,
Alexander Venin a écrit :
> I started JSON RPC TCP server, another JSON RPC client connected to the server. How can server obtain an IP address of connected client? As I see It's impossible: in function TcpServer::Accept call to "accept()" with sockaddr parameter set to 0 and no information about client has stored in list except of client's connected socket descriptor.
> May be I can fix this shortcoming ? I wish to store in list not only socket descriptor but client IP address.
>
>
You can get client's sockaddr by calling getpeername() on the socket
descriptor.
Regards,
--
Seb
> Thanks in advance, Alexander.
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Jsonrpc-cpp-devel mailing list
> Jso...@li...
> https://lists.sourceforge.net/lists/listinfo/jsonrpc-cpp-devel
>
>
|