X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41e69d79eaf36c46ed33d198ad094069d10e5ade..fa2370f16a290db54cfbc41ac608495a2aa9a33f:/interface/wx/socket.h diff --git a/interface/wx/socket.h b/interface/wx/socket.h index bfdb1c5cf8..621df49adf 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; }; @@ -257,12 +257,12 @@ public: @return @true on success, @false if something goes wrong (invalid @a service). */ - virtual bool Service(unsigned short service); + virtual bool Service(unsigned short service) = 0; /** Returns the current service. */ - virtual unsigned short Service(); + virtual unsigned short Service() const = 0; }; @@ -712,6 +712,13 @@ public: */ bool GetPeer(wxSockAddress& addr) const; + /** + Return the socket timeout in seconds. + + The timeout can be set using SetTimeout() and is 10 minutes by default. + */ + long GetTimeout() const; + /** Returns @true if the socket is connected. */ @@ -1220,27 +1227,6 @@ public: */ 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. @@ -1257,7 +1243,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); };