1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSocket*Stream
4 // Author: Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __SCK_STREAM_H__
12 #define __SCK_STREAM_H__
14 #if defined(__GNUG__) && !defined(__APPLE__)
18 #include "wx/stream.h"
20 #if wxUSE_SOCKETS && wxUSE_STREAMS
22 #include "wx/socket.h"
24 class WXDLLEXPORT wxSocketOutputStream
: public wxOutputStream
27 wxSocketOutputStream(wxSocketBase
& s
);
28 ~wxSocketOutputStream();
30 off_t
SeekO( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
36 wxSocketBase
*m_o_socket
;
38 size_t OnSysWrite(const void *buffer
, size_t bufsize
);
41 class WXDLLEXPORT wxSocketInputStream
: public wxInputStream
44 wxSocketInputStream(wxSocketBase
& s
);
45 ~wxSocketInputStream();
47 off_t
SeekI( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
53 wxSocketBase
*m_i_socket
;
55 size_t OnSysRead(void *buffer
, size_t bufsize
);
58 class WXDLLEXPORT wxSocketStream
: public wxSocketInputStream
,
59 public wxSocketOutputStream
62 wxSocketStream(wxSocketBase
& s
);
67 // wxUSE_SOCKETS && wxUSE_STREAMS