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 WXDLLIMPEXP_BASE 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
);
40 DECLARE_NO_COPY_CLASS(wxSocketOutputStream
)
43 class WXDLLIMPEXP_BASE wxSocketInputStream
: public wxInputStream
46 wxSocketInputStream(wxSocketBase
& s
);
47 ~wxSocketInputStream();
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
);
59 DECLARE_NO_COPY_CLASS(wxSocketInputStream
)
62 class WXDLLIMPEXP_BASE wxSocketStream
: public wxSocketInputStream
,
63 public wxSocketOutputStream
66 wxSocketStream(wxSocketBase
& s
);
69 DECLARE_NO_COPY_CLASS(wxSocketStream
)
73 // wxUSE_SOCKETS && wxUSE_STREAMS