]>
Commit | Line | Data |
---|---|---|
f4ada568 GL |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: sckstrm.h | |
3 | // Purpose: wxSocket*Stream | |
4 | // Author: Guilhem Lavaux | |
5 | // Modified by: | |
6 | // Created: 17/07/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | #ifndef __SCK_STREAM_H__ | |
12 | #define __SCK_STREAM_H__ | |
13 | ||
af49c4b8 | 14 | #if defined(__GNUG__) && !defined(__APPLE__) |
f4ada568 GL |
15 | #pragma interface |
16 | #endif | |
17 | ||
18 | #include "wx/stream.h" | |
ce4169a4 RR |
19 | |
20 | #if wxUSE_SOCKETS && wxUSE_STREAMS | |
21 | ||
f4ada568 GL |
22 | #include "wx/socket.h" |
23 | ||
bddd7a8d | 24 | class WXDLLIMPEXP_BASE wxSocketOutputStream : public wxOutputStream |
f4ada568 GL |
25 | { |
26 | public: | |
27 | wxSocketOutputStream(wxSocketBase& s); | |
75ed1d15 | 28 | ~wxSocketOutputStream(); |
f4ada568 | 29 | |
54da4255 | 30 | off_t SeekO( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) ) |
e22036dc | 31 | { return -1; } |
54da4255 | 32 | off_t TellO() const |
e22036dc | 33 | { return -1; } |
f4ada568 | 34 | |
f4ada568 GL |
35 | protected: |
36 | wxSocketBase *m_o_socket; | |
375abe3d GL |
37 | |
38 | size_t OnSysWrite(const void *buffer, size_t bufsize); | |
22f3361e VZ |
39 | |
40 | DECLARE_NO_COPY_CLASS(wxSocketOutputStream) | |
f4ada568 GL |
41 | }; |
42 | ||
bddd7a8d | 43 | class WXDLLIMPEXP_BASE wxSocketInputStream : public wxInputStream |
f4ada568 GL |
44 | { |
45 | public: | |
46 | wxSocketInputStream(wxSocketBase& s); | |
47 | ~wxSocketInputStream(); | |
48 | ||
54da4255 | 49 | off_t SeekI( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) ) |
e22036dc | 50 | { return -1; } |
54da4255 | 51 | off_t TellI() const |
e22036dc | 52 | { return -1; } |
f4ada568 | 53 | |
f4ada568 GL |
54 | protected: |
55 | wxSocketBase *m_i_socket; | |
375abe3d GL |
56 | |
57 | size_t OnSysRead(void *buffer, size_t bufsize); | |
22f3361e VZ |
58 | |
59 | DECLARE_NO_COPY_CLASS(wxSocketInputStream) | |
f4ada568 GL |
60 | }; |
61 | ||
bddd7a8d | 62 | class WXDLLIMPEXP_BASE wxSocketStream : public wxSocketInputStream, |
1777b9bb | 63 | public wxSocketOutputStream |
75ed1d15 | 64 | { |
f4ada568 | 65 | public: |
f4ada568 | 66 | wxSocketStream(wxSocketBase& s); |
75ed1d15 | 67 | ~wxSocketStream(); |
f4ada568 GL |
68 | }; |
69 | ||
70 | #endif | |
ce4169a4 RR |
71 | // wxUSE_SOCKETS && wxUSE_STREAMS |
72 | ||
73 | #endif | |
a324a7bc | 74 | // __SCK_STREAM_H__ |