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 #include "wx/stream.h"
16 #if wxUSE_SOCKETS && wxUSE_STREAMS
18 #include "wx/socket.h"
20 class WXDLLIMPEXP_NET wxSocketOutputStream
: public wxOutputStream
23 wxSocketOutputStream(wxSocketBase
& s
);
24 virtual ~wxSocketOutputStream();
26 wxFileOffset
SeekO( wxFileOffset
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
28 wxFileOffset
TellO() const
32 wxSocketBase
*m_o_socket
;
34 size_t OnSysWrite(const void *buffer
, size_t bufsize
);
36 wxDECLARE_NO_COPY_CLASS(wxSocketOutputStream
);
39 class WXDLLIMPEXP_NET wxSocketInputStream
: public wxInputStream
42 wxSocketInputStream(wxSocketBase
& s
);
43 virtual ~wxSocketInputStream();
45 wxFileOffset
SeekI( wxFileOffset
WXUNUSED(pos
), wxSeekMode
WXUNUSED(mode
) )
47 wxFileOffset
TellI() const
51 wxSocketBase
*m_i_socket
;
53 size_t OnSysRead(void *buffer
, size_t bufsize
);
55 wxDECLARE_NO_COPY_CLASS(wxSocketInputStream
);
58 class WXDLLIMPEXP_NET wxSocketStream
: public wxSocketInputStream
,
59 public wxSocketOutputStream
62 wxSocketStream(wxSocketBase
& s
);
63 virtual ~wxSocketStream();
65 wxDECLARE_NO_COPY_CLASS(wxSocketStream
);
69 // wxUSE_SOCKETS && wxUSE_STREAMS