no changes, just reformat/indent consistently

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-02 21:58:09 +00:00
parent df21920b80
commit f26d81383f
2 changed files with 192 additions and 194 deletions

View File

@@ -101,7 +101,6 @@ enum wxSocketType
class WXDLLIMPEXP_NET wxSocketBase : public wxObject class WXDLLIMPEXP_NET wxSocketBase : public wxObject
{ {
public: public:
// Public interface // Public interface
// ---------------- // ----------------
@@ -205,10 +204,10 @@ private:
// wait until the given flags are set for this socket or the given timeout // wait until the given flags are set for this socket or the given timeout
// (or m_timeout) expires // (or m_timeout) expires
// //
// notice that wxSOCKET_LOST_FLAG is always taken into account but the return // notice that wxSOCKET_LOST_FLAG is always taken into account but the
// value depends on whether it is included in flags or not: if it is, and the // return value depends on whether it is included in flags or not: if it
// connection is indeed lost, true is returned, but if it isn't then the // is, and the connection is indeed lost, true is returned, but if it isn't
// function returns false in this case // then the function returns false in this case
// //
// false is always returned if we returned because of the timeout expiration // false is always returned if we returned because of the timeout expiration
bool DoWait(long timeout, wxSocketEventFlags flags); bool DoWait(long timeout, wxSocketEventFlags flags);
@@ -282,10 +281,9 @@ private:
class WXDLLIMPEXP_NET wxSocketServer : public wxSocketBase class WXDLLIMPEXP_NET wxSocketServer : public wxSocketBase
{ {
DECLARE_CLASS(wxSocketServer)
public: public:
wxSocketServer(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE); wxSocketServer(const wxSockAddress& addr,
wxSocketFlags flags = wxSOCKET_NONE);
wxSocketBase* Accept(bool wait = true); wxSocketBase* Accept(bool wait = true);
bool AcceptWith(wxSocketBase& socket, bool wait = true); bool AcceptWith(wxSocketBase& socket, bool wait = true);
@@ -293,6 +291,7 @@ public:
bool WaitForAccept(long seconds = -1, long milliseconds = 0); bool WaitForAccept(long seconds = -1, long milliseconds = 0);
DECLARE_NO_COPY_CLASS(wxSocketServer) DECLARE_NO_COPY_CLASS(wxSocketServer)
DECLARE_CLASS(wxSocketServer)
}; };
@@ -302,20 +301,19 @@ public:
class WXDLLIMPEXP_NET wxSocketClient : public wxSocketBase class WXDLLIMPEXP_NET wxSocketClient : public wxSocketBase
{ {
DECLARE_CLASS(wxSocketClient)
public: public:
wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE); wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
virtual ~wxSocketClient();
virtual bool Connect(const wxSockAddress& addr, bool wait = true); virtual bool Connect(const wxSockAddress& addr, bool wait = true);
bool Connect(const wxSockAddress& addr, const wxSockAddress& local, bool Connect(const wxSockAddress& addr,
const wxSockAddress& local,
bool wait = true); bool wait = true);
bool WaitOnConnect(long seconds = -1, long milliseconds = 0); bool WaitOnConnect(long seconds = -1, long milliseconds = 0);
// Sets initial socket buffer sizes using the SO_SNDBUF and SO_RCVBUF options // Sets initial socket buffer sizes using the SO_SNDBUF and SO_RCVBUF
// before calling connect (either one can be -1 to leave it unchanged) // options before calling connect (either one can be -1 to leave it
// unchanged)
void SetInitialSocketBuffers(int recv, int send) void SetInitialSocketBuffers(int recv, int send)
{ {
m_initialRecvBufferSize = recv; m_initialRecvBufferSize = recv;
@@ -332,6 +330,7 @@ private:
int m_initialSendBufferSize; int m_initialSendBufferSize;
DECLARE_NO_COPY_CLASS(wxSocketClient) DECLARE_NO_COPY_CLASS(wxSocketClient)
DECLARE_CLASS(wxSocketClient)
}; };
@@ -343,22 +342,24 @@ private:
class WXDLLIMPEXP_NET wxDatagramSocket : public wxSocketBase class WXDLLIMPEXP_NET wxDatagramSocket : public wxSocketBase
{ {
DECLARE_CLASS(wxDatagramSocket)
public: public:
wxDatagramSocket(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE); wxDatagramSocket(const wxSockAddress& addr,
wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket& RecvFrom( wxSockAddress& addr, wxDatagramSocket& RecvFrom(wxSockAddress& addr,
void* buf, void *buf,
wxUint32 nBytes ); wxUint32 nBytes);
wxDatagramSocket& SendTo( const wxSockAddress& addr, wxDatagramSocket& SendTo(const wxSockAddress& addr,
const void* buf, const void* buf,
wxUint32 nBytes ); wxUint32 nBytes);
/* TODO: /* TODO:
bool Connect(wxSockAddress& addr); bool Connect(wxSockAddress& addr);
*/ */
private:
DECLARE_NO_COPY_CLASS(wxDatagramSocket) DECLARE_NO_COPY_CLASS(wxDatagramSocket)
DECLARE_CLASS(wxDatagramSocket)
}; };
@@ -375,7 +376,8 @@ public:
} }
wxSocketNotify GetSocketEvent() const { return m_event; } wxSocketNotify GetSocketEvent() const { return m_event; }
wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); } wxSocketBase *GetSocket() const
{ return (wxSocketBase *) GetEventObject(); }
void *GetClientData() const { return m_clientData; } void *GetClientData() const { return m_clientData; }
virtual wxEvent *Clone() const { return new wxSocketEvent(*this); } virtual wxEvent *Clone() const { return new wxSocketEvent(*this); }

View File

@@ -1804,10 +1804,6 @@ wxSocketClient::wxSocketClient(wxSocketFlags flags)
m_initialSendBufferSize = -1; m_initialSendBufferSize = -1;
} }
wxSocketClient::~wxSocketClient()
{
}
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Connect // Connect
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------