]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sckstrm.h
Project file update
[wxWidgets.git] / include / wx / sckstrm.h
CommitLineData
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
14#ifdef __GNUG__
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
75ed1d15 24class WXDLLEXPORT 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);
f4ada568
GL
39};
40
75ed1d15 41class WXDLLEXPORT wxSocketInputStream : public wxInputStream
f4ada568
GL
42{
43 public:
44 wxSocketInputStream(wxSocketBase& s);
45 ~wxSocketInputStream();
46
54da4255 47 off_t SeekI( off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
e22036dc 48 { return -1; }
54da4255 49 off_t TellI() const
e22036dc 50 { return -1; }
f4ada568 51
f4ada568
GL
52 protected:
53 wxSocketBase *m_i_socket;
375abe3d
GL
54
55 size_t OnSysRead(void *buffer, size_t bufsize);
f4ada568
GL
56};
57
58class WXDLLEXPORT wxSocketStream : public wxSocketInputStream,
1777b9bb 59 public wxSocketOutputStream
75ed1d15 60{
f4ada568 61 public:
f4ada568 62 wxSocketStream(wxSocketBase& s);
75ed1d15 63 ~wxSocketStream();
f4ada568
GL
64};
65
66#endif
ce4169a4
RR
67 // wxUSE_SOCKETS && wxUSE_STREAMS
68
69#endif
a324a7bc 70 // __SCK_STREAM_H__