Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Feature request - GetPeerAddr in WebSocket
Feature request - GetPeerAddr in WebSocket [message #49982] Sun, 10 June 2018 21:24 Go to next message
Zbych is currently offline  Zbych
Messages: 307
Registered: July 2009
Senior Member
Hi,

Can we add GetPeerAddr to WebSocket? Right now there is no function that returns client's address.
It is just single line in Inet.h:
	dword  GetWaitEvents() const  { return WAIT_READ|(!!out_queue.GetCount() * WAIT_WRITE); }
	SOCKET GetSOCKET() const      { return socket ? socket->GetSOCKET() : 0; }
	String GetPeerAddr() const    { return socket ? socket->GetPeerAddr() : ""; } //<---- NEW LINE
Re: Feature request - GetPeerAddr in WebSocket [message #49983 is a reply to message #49982] Mon, 11 June 2018 13:53 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 307
Registered: July 2009
Senior Member
BTW,

GetSOCKET() should return INVALID_SOCKET not 0 when socket is nullptr.
Re: Feature request - GetPeerAddr in WebSocket [message #49984 is a reply to message #49983] Mon, 11 June 2018 14:52 Go to previous message
mirek is currently offline  mirek
Messages: 11994
Registered: November 2005
Ultimate Member
Thanks, applied.
Previous Topic: SCGI server
Next Topic: Thread::GetId() returning 0
Goto Forum:
  


Current Time: Sun Aug 25 11:55:03 CEST 2019

Total time taken to generate the page: 0.01588 seconds