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(NO_GCC_PRAGMA)
18 #include "wx/stream.h"
20 #if wxUSE_SOCKETS && wxUSE_STREAMS
22 #include "wx/socket.h"
24 class WXDLLIMPEXP_NET wxSocketOutputStream
: public wxOutputStream
27 wxSocketOutputStream(wxSocketBase
& s
);
28 ~wxSocketOutputStream();
30 wxFileOffset
SeekO( wxFileOffset
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
32 wxFileOffset
TellO() const
36 wxSocketBase
*m_o_socket
;
38 size_t OnSysWrite(const void *buffer
, size_t bufsize
);
40 DECLARE_NO_COPY_CLASS(wxSocketOutputStream
)
43 class WXDLLIMPEXP_NET wxSocketInputStream
: public wxInputStream
46 wxSocketInputStream(wxSocketBase
& s
);
47 ~wxSocketInputStream();
49 wxFileOffset
SeekI( wxFileOffset
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
51 wxFileOffset
TellI() const
55 wxSocketBase
*m_i_socket
;
57 size_t OnSysRead(void *buffer
, size_t bufsize
);
59 DECLARE_NO_COPY_CLASS(wxSocketInputStream
)
62 class WXDLLIMPEXP_NET wxSocketStream
: public wxSocketInputStream
,
63 public wxSocketOutputStream
66 wxSocketStream(wxSocketBase
& s
);
69 DECLARE_NO_COPY_CLASS(wxSocketStream
)
73 // wxUSE_SOCKETS && wxUSE_STREAMS