U++ framework
Do not panic. Ask here before giving up.

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: 332
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: 332
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: 14290
Registered: November 2005
Ultimate Member
Thanks, applied.
Previous Topic: SCGI server
Next Topic: Thread::GetId() returning 0
Goto Forum:
  


Current Time: Fri May 01 17:57:54 GMT+2 2026

Total time taken to generate the page: 0.00426 seconds