1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSocket*Stream
4 // Author: Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __SCK_STREAM_H__
12 #define __SCK_STREAM_H__
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 wxOutputStream
& Write(const void *buffer
, size_t size
);
31 off_t
SeekO( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
37 wxSocketBase
*m_o_socket
;
39 size_t OnSysWrite(const void *buffer
, size_t bufsize
);
42 class WXDLLEXPORT wxSocketInputStream
: public wxInputStream
45 wxSocketInputStream(wxSocketBase
& s
);
46 ~wxSocketInputStream();
48 wxInputStream
& Read(void *buffer
, size_t size
);
49 off_t
SeekI( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
55 wxSocketBase
*m_i_socket
;
57 size_t OnSysRead(void *buffer
, size_t bufsize
);
60 class WXDLLEXPORT wxSocketStream
: public wxSocketInputStream
,
61 public wxSocketOutputStream
64 wxSocketStream(wxSocketBase
& s
);
69 // wxUSE_SOCKETS && wxUSE_STREAMS