add accessors for sockaddr to wxSockAddress (closes #10511)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-22 23:38:07 +00:00
parent 70412bd46c
commit 5fab0c8d86
3 changed files with 40 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sckaddr.h
// Name: wx/sckaddr.h
// Purpose: Network address classes
// Author: Guilhem Lavaux
// Modified by:
@@ -20,6 +20,11 @@
class wxSockAddressImpl;
// forward declare it instead of including the system headers defining it which
// can bring in <windows.h> under Windows which we don't want to include from
// public wx headers
struct sockaddr;
// Any socket address kind
class WXDLLIMPEXP_NET wxSockAddress : public wxObject
{
@@ -41,6 +46,10 @@ public:
virtual void Clear();
virtual Family Type() = 0;
// accessors for the low level address represented by this object
const sockaddr *GetAddressData() const;
int GetAddressDataLen() const;
// we need to be able to create copies of the addresses polymorphically
// (i.e. without knowing the exact address class)
virtual wxSockAddress *Clone() const = 0;