X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da1ed74c85f53a75a193c7dcbd2013aa266a222c..a70ab3b804b6c363f8bcbed0b4fce94b7fb03612:/interface/wx/socket.h diff --git a/interface/wx/socket.h b/interface/wx/socket.h index 0a4f3bc93a..0c7b0eceae 100644 --- a/interface/wx/socket.h +++ b/interface/wx/socket.h @@ -70,12 +70,12 @@ public: @return @true on success, @false if something goes wrong (invalid @a service). */ - bool Service(unsigned short service); + bool Service(unsigned short service) = 0; /** Returns the current service. */ - unsigned short Service(); + unsigned short Service() const = 0; }; @@ -262,7 +262,7 @@ public: /** Returns the current service. */ - virtual unsigned short Service(); + virtual unsigned short Service() const; }; @@ -1196,6 +1196,8 @@ public: /** @class wxDatagramSocket + @todo docme + @library{wxnet} @category{net} */ @@ -1205,37 +1207,19 @@ public: /** Constructor. + @param addr + The socket address. @param flags - Socket flags (See wxSocketBase::SetFlags()) + Socket flags (See wxSocketBase::SetFlags()). */ - wxDatagramSocket(wxSocketFlags flags = wxSOCKET_NONE); + wxDatagramSocket(const wxSockAddress& addr, + wxSocketFlags flags = wxSOCKET_NONE); /** Destructor. Please see wxSocketBase::Destroy(). */ virtual ~wxDatagramSocket(); - /** - This function reads a buffer of @a nbytes bytes from the socket. - Use wxSocketBase::LastCount() to verify the number of bytes actually read. - Use wxSocketBase::Error() to determine if the operation succeeded. - - @param address - Any address - will be overwritten with the address of the peer that sent - that data. - @param buffer - Buffer where to put read data. - @param nbytes - Number of bytes. - - @return Returns a reference to the current object, and the address of - the peer that sent the data on address param. - - @see wxSocketBase::LastError(), wxSocketBase::SetFlags() - */ - wxDatagramSocket ReceiveFrom(wxSockAddress& address, - void* buffer, wxUint32 nbytes); - /** This function writes a buffer of @a nbytes bytes to the socket. Use wxSocketBase::LastCount() to verify the number of bytes actually wrote. @@ -1252,7 +1236,7 @@ public: @see wxSocketBase::LastError(), wxSocketBase::SetFlags() */ - wxDatagramSocket SendTo(const wxSockAddress& address, - const void* buffer, wxUint32 nbytes); + wxDatagramSocket& SendTo(const wxSockAddress& address, + const void* buffer, wxUint32 nbytes); };