]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sckstrm.h
don't lock the gs_prevCS critical section recursively (replaces patch 1857581)
[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)
65571936 9// Licence: wxWindows licence
f4ada568
GL
10/////////////////////////////////////////////////////////////////////////////
11#ifndef __SCK_STREAM_H__
12#define __SCK_STREAM_H__
13
f4ada568 14#include "wx/stream.h"
ce4169a4
RR
15
16#if wxUSE_SOCKETS && wxUSE_STREAMS
17
f4ada568
GL
18#include "wx/socket.h"
19
7c4728f6 20class WXDLLIMPEXP_NET wxSocketOutputStream : public wxOutputStream
f4ada568
GL
21{
22 public:
23 wxSocketOutputStream(wxSocketBase& s);
d3c7fc99 24 virtual ~wxSocketOutputStream();
f4ada568 25
4004775e 26 wxFileOffset SeekO( wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
e22036dc 27 { return -1; }
4004775e 28 wxFileOffset TellO() const
e22036dc 29 { return -1; }
f4ada568 30
f4ada568
GL
31 protected:
32 wxSocketBase *m_o_socket;
375abe3d
GL
33
34 size_t OnSysWrite(const void *buffer, size_t bufsize);
22f3361e
VZ
35
36 DECLARE_NO_COPY_CLASS(wxSocketOutputStream)
f4ada568
GL
37};
38
7c4728f6 39class WXDLLIMPEXP_NET wxSocketInputStream : public wxInputStream
f4ada568
GL
40{
41 public:
42 wxSocketInputStream(wxSocketBase& s);
d3c7fc99 43 virtual ~wxSocketInputStream();
f4ada568 44
4004775e 45 wxFileOffset SeekI( wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode) )
e22036dc 46 { return -1; }
4004775e 47 wxFileOffset TellI() const
e22036dc 48 { return -1; }
f4ada568 49
f4ada568
GL
50 protected:
51 wxSocketBase *m_i_socket;
375abe3d
GL
52
53 size_t OnSysRead(void *buffer, size_t bufsize);
22f3361e
VZ
54
55 DECLARE_NO_COPY_CLASS(wxSocketInputStream)
f4ada568
GL
56};
57
7c4728f6 58class WXDLLIMPEXP_NET wxSocketStream : public wxSocketInputStream,
1777b9bb 59 public wxSocketOutputStream
75ed1d15 60{
f4ada568 61 public:
f4ada568 62 wxSocketStream(wxSocketBase& s);
d3c7fc99 63 virtual ~wxSocketStream();
fc7a2a60
VZ
64
65 DECLARE_NO_COPY_CLASS(wxSocketStream)
f4ada568
GL
66};
67
68#endif
ce4169a4
RR
69 // wxUSE_SOCKETS && wxUSE_STREAMS
70
71#endif
a324a7bc 72 // __SCK_STREAM_H__