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"
19 #include "wx/socket.h"
21 class WXDLLEXPORT wxSocketOutputStream
: public wxOutputStream
24 wxSocketOutputStream(wxSocketBase
& s
);
25 ~wxSocketOutputStream();
27 wxOutputStream
& Write(const void *buffer
, size_t size
);
28 off_t
SeekO( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
34 wxSocketBase
*m_o_socket
;
36 size_t OnSysWrite(const void *buffer
, size_t bufsize
);
39 class WXDLLEXPORT wxSocketInputStream
: public wxInputStream
42 wxSocketInputStream(wxSocketBase
& s
);
43 ~wxSocketInputStream();
45 wxInputStream
& Read(void *buffer
, size_t size
);
46 off_t
SeekI( off_t
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
52 wxSocketBase
*m_i_socket
;
54 size_t OnSysRead(void *buffer
, size_t bufsize
);
57 class WXDLLEXPORT wxSocketStream
: public wxSocketInputStream
,
58 public wxSocketOutputStream
61 wxSocketStream(wxSocketBase
& s
);