]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/socket.h
Work on streams of all sorts. More to come.
[wxWidgets.git] / include / wx / socket.h
index 23b6b2b8d372c2b567e9e0fab688c3e2bd9ca5ae..36a0934e45e35bfbc7a1590b22d1826da64f6f8b 100644 (file)
 #pragma interface "socket.h"
 #endif
 
+#include "wx/defs.h"
+
+#if wxUSE_SOCKETS
+
 // ---------------------------------------------------------------------------
 // Windows(tm) specific
 // ---------------------------------------------------------------------------
 // wxSocket headers (generic)
 // ---------------------------------------------------------------------------
 #ifdef WXPREC
-#include <wx/wxprec.h>
+  #include "wx/wxprec.h"
 #else
-#include <wx/wx.h>
+  #include "wx/event.h"
+  #include "wx/string.h"
 #endif
+
 #include "wx/sckaddr.h"
 
 class WXDLLEXPORT wxSocketEvent;
@@ -95,6 +101,8 @@ public:
   wxSocketBase& Read(char* buffer, size_t nbytes);
   wxSocketBase& Write(const char *buffer, size_t nbytes);
   wxSocketBase& Unread(const char *buffer, size_t nbytes);
+  wxSocketBase& ReadMsg(char *buffer, size_t nbytes);
+  wxSocketBase& WriteMsg(const char *buffer, size_t nbytes);
   void Discard();
 
   // Try not to use this two methods (they sould be protected)
@@ -252,17 +260,6 @@ public:
 
   // Create or reuse a socket handler
   static wxSocketHandler& Master() { return *master; }
-
-#if defined(WXSOCK_INTERNAL) && defined(__WINDOWS__)
-
-  friend LRESULT APIENTRY _EXPORT wxSocketHandlerWndProc(HWND hWnd,
-                        UINT message, WPARAM wParam, LPARAM lParam);
-
-  UINT NewMessage(wxSocketBase *sock);
-  void DestroyMessage(UINT msg);
-
-  HWND GetHWND() const;
-#endif
 };
 
 class WXDLLEXPORT wxSocketEvent : public wxEvent {
@@ -273,7 +270,8 @@ public:
   wxSocketBase::wxRequestEvent SocketEvent() const { return m_skevt; }
   wxSocketBase *Socket() const { return m_socket; }
 
-  wxObject *Clone() const;
+  void CopyObject(wxObject& obj_d) const;
+
 public:
   wxSocketBase::wxRequestEvent m_skevt;
   wxSocketBase *m_socket;
@@ -286,3 +284,7 @@ typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&);
   (wxObject *) NULL  },
 
 #endif
+  // wxUSE_SOCKETS
+
+#endif
+  // _WX_NETWORK_SOCKET_H