X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33d925b0d96b60febb3ad39295a8da96294a5e16..470402b9966ec0c9b0011193cb82bd6baa4a98c5:/include/wx/socket.h diff --git a/include/wx/socket.h b/include/wx/socket.h index 266a24321d..ee2578f3c2 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -108,7 +108,8 @@ public: bool Destroy(); // state - inline bool Ok() const { return (m_socket != NULL); }; + inline bool Ok() const { return IsOk(); } + inline bool IsOk() const { return (m_socket != NULL); }; inline bool Error() const { return m_error; }; inline bool IsConnected() const { return m_connected; }; inline bool IsData() { return WaitForRead(0, 0); }; @@ -121,7 +122,7 @@ public: // addresses virtual bool GetLocal(wxSockAddress& addr_man) const; virtual bool GetPeer(wxSockAddress& addr_man) const; - virtual bool SetLocal(wxSockAddress& local); + virtual bool SetLocal(wxIPV4address& local); // base IO virtual bool Close(); @@ -202,6 +203,7 @@ private: wxList m_states; // stack of states bool m_interrupt; // interrupt ongoing wait operations? bool m_beingDeleted; // marked for delayed deletion? + wxIPV4address m_localAddress; // bind to local address? // pushback buffer void *m_unread; // pushback buffer @@ -255,7 +257,7 @@ public: virtual ~wxSocketClient(); virtual bool Connect(wxSockAddress& addr, bool wait = true); - virtual bool Connect(wxSockAddress& addr, wxSockAddress& local, bool wait = true); + bool Connect(wxSockAddress& addr, wxSockAddress& local, bool wait = true); bool WaitOnConnect(long seconds = -1, long milliseconds = 0);