]> git.saurik.com Git - wxWidgets.git/blame - src/common/sckstrm.cpp
fix for private access for wxTimerProc
[wxWidgets.git] / src / common / sckstrm.cpp
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#ifdef __GNUG__
12#pragma implementation "sckstrm.h"
13#endif
14
fcc6dddd
JS
15// For compilers that support precompilation, includes "wx.h".
16#include "wx/wxprec.h"
17
18#ifdef __BORLANDC__
19#pragma hdrstop
20#endif
21
22#ifndef WX_PRECOMP
23#endif
24
f4ada568
GL
25#include "wx/stream.h"
26#include "wx/socket.h"
27#include "wx/sckstrm.h"
28
29// ---------------------------------------------------------------------------
30// wxSocketOutputStream
31// ---------------------------------------------------------------------------
32
33wxSocketOutputStream::wxSocketOutputStream(wxSocketBase& s)
34 : m_o_socket(&s)
35{
36}
37
38wxSocketOutputStream::~wxSocketOutputStream()
39{
40}
41
42wxOutputStream& wxSocketOutputStream::Write(const void *buffer, size_t size)
43{
44 m_o_socket->Write((const char *)buffer, size);
45 return *this;
46}
47
48// ---------------------------------------------------------------------------
49// wxSocketInputStream
50// ---------------------------------------------------------------------------
51
52wxSocketInputStream::wxSocketInputStream(wxSocketBase& s)
53 : m_i_socket(&s)
54{
55}
56
57wxSocketInputStream::~wxSocketInputStream()
58{
59}
60
61wxInputStream& wxSocketInputStream::Read(void *buffer, size_t size)
62{
63 m_i_socket->Read((char *)buffer, size);
64 return *this;
65}
66
67// ---------------------------------------------------------------------------
68// wxSocketStream (IO)
69// ---------------------------------------------------------------------------
70wxSocketStream::wxSocketStream(wxSocketBase& i_s, wxSocketBase& o_s)
71 : wxSocketInputStream(i_s), wxSocketOutputStream(o_s)
72{
73}
74
75wxSocketStream::wxSocketStream(wxSocketBase& s)
76 : wxSocketInputStream(s), wxSocketOutputStream(s)
77{
78}