Add wxSocketBase::GetSocket().

Provide direct access to the underlying socket descriptor.

Closes #8829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-04-22 10:45:30 +00:00
parent 98a177f45a
commit 0623b0f001
5 changed files with 56 additions and 9 deletions

View File

@@ -7,6 +7,16 @@
/////////////////////////////////////////////////////////////////////////////
/**
The type of the native socket.
Notice that the definition below is simplified and this type is not always
int, e.g. it is a 64 bit integer type under Win64.
@since 2.9.5
*/
typedef int wxSOCKET_T;
/**
@class wxIPaddress
@@ -1387,6 +1397,25 @@ public:
*/
void SetNotify(wxSocketEventFlags flags);
/**
Returns the native socket descriptor.
This is intended to use with rarely used specific platform features
that can only be accessed via the actual socket descriptor.
Do not use this for reading or writing data from or to the socket as
this would almost surely interfere with wxSocket code logic and result
in unexpected behaviour.
The socket must be successfully initialized, e.g. connected for client
sockets, before this method can be called.
@return Returns the native socket descriptor.
@since 2.9.5
*/
wxSOCKET_T GetSocket() const;
//@}
};