git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54504
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// addresses
virtual bool GetLocal(wxSockAddress& addr_man) const;
virtual bool GetPeer(wxSockAddress& addr_man) const;
// addresses
virtual bool GetLocal(wxSockAddress& addr_man) const;
virtual bool GetPeer(wxSockAddress& addr_man) const;
- virtual bool SetLocal(wxIPV4address& local);
+ virtual bool SetLocal(const wxIPV4address& local);
// base IO
virtual bool Close();
// base IO
virtual bool Close();
wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
virtual ~wxSocketClient();
wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
virtual ~wxSocketClient();
- virtual bool Connect(wxSockAddress& addr, bool wait = true);
- bool Connect(wxSockAddress& addr, wxSockAddress& local, bool wait = true);
+ virtual bool Connect(const wxSockAddress& addr, bool wait = true);
+ bool Connect(const wxSockAddress& addr, const wxSockAddress& local,
+ bool wait = true);
bool WaitOnConnect(long seconds = -1, long milliseconds = 0);
bool WaitOnConnect(long seconds = -1, long milliseconds = 0);
- virtual bool
- DoConnect(wxSockAddress& addr, wxSockAddress* local, bool wait = true);
+ virtual bool DoConnect(const wxSockAddress& addr,
+ const wxSockAddress* local,
+ bool wait = true);
// buffer sizes, -1 if unset and defaults should be used
int m_initialRecvBufferSize;
// buffer sizes, -1 if unset and defaults should be used
int m_initialRecvBufferSize;
@see WaitOnConnect(), wxSocketBase::SetNotify,
wxSocketBase::Notify
*/
@see WaitOnConnect(), wxSocketBase::SetNotify,
wxSocketBase::Notify
*/
- bool Connect(wxSockAddress& address, bool wait = true);
- bool Connect(wxSockAddress& address, wxSockAddress& local,
+ bool Connect(const wxSockAddress& address, bool wait = true);
+ bool Connect(const wxSockAddress& address, const wxSockAddress& local,
a local port is set for a wxSocketClient,
@b bind will be called before @b connect.
*/
a local port is set for a wxSocketClient,
@b bind will be called before @b connect.
*/
- bool SetLocal(wxIPV4address& local);
+ bool SetLocal(const wxIPV4address& local);
/**
SetNotify specifies which socket events are to be sent to the event handler.
/**
SetNotify specifies which socket events are to be sent to the event handler.
-bool wxSocketBase::SetLocal(wxIPV4address& local)
+bool wxSocketBase::SetLocal(const wxIPV4address& local)
{
GAddress* la = local.GetAddress();
{
GAddress* la = local.GetAddress();
// Connect
// --------------------------------------------------------------------------
// Connect
// --------------------------------------------------------------------------
-bool wxSocketClient::DoConnect(wxSockAddress& addr_man, wxSockAddress* local, bool wait)
+bool wxSocketClient::DoConnect(const wxSockAddress& addr_man,
+ const wxSockAddress* local,
+ bool wait)
-bool wxSocketClient::Connect(wxSockAddress& addr_man, bool wait)
+bool wxSocketClient::Connect(const wxSockAddress& addr_man, bool wait)
- return (DoConnect(addr_man, NULL, wait));
+ return DoConnect(addr_man, NULL, wait);
-bool wxSocketClient::Connect(wxSockAddress& addr_man, wxSockAddress& local, bool wait)
+bool wxSocketClient::Connect(const wxSockAddress& addr_man,
+ const wxSockAddress& local,
+ bool wait)
- return (DoConnect(addr_man, &local, wait));
+ return DoConnect(addr_man, &local, wait);
}
bool wxSocketClient::WaitOnConnect(long seconds, long milliseconds)
}
bool wxSocketClient::WaitOnConnect(long seconds, long milliseconds)