]>
git.saurik.com Git - wxWidgets.git/blob - src/common/sckstrm.cpp
c0846c46aae239699675810fde43529ee00d09f0
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSocket*Stream
4 // Author: Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "sckstrm.h"
15 #include "wx/stream.h"
16 #include "wx/socket.h"
17 #include "wx/sckstrm.h"
19 // ---------------------------------------------------------------------------
20 // wxSocketOutputStream
21 // ---------------------------------------------------------------------------
23 wxSocketOutputStream::wxSocketOutputStream(wxSocketBase
& s
)
28 wxSocketOutputStream::~wxSocketOutputStream()
32 wxOutputStream
& wxSocketOutputStream::Write(const void *buffer
, size_t size
)
34 m_o_socket
->Write((const char *)buffer
, size
);
38 // ---------------------------------------------------------------------------
39 // wxSocketInputStream
40 // ---------------------------------------------------------------------------
42 wxSocketInputStream::wxSocketInputStream(wxSocketBase
& s
)
47 wxSocketInputStream::~wxSocketInputStream()
51 wxInputStream
& wxSocketInputStream::Read(void *buffer
, size_t size
)
53 m_i_socket
->Read((char *)buffer
, size
);
57 // ---------------------------------------------------------------------------
58 // wxSocketStream (IO)
59 // ---------------------------------------------------------------------------
60 wxSocketStream::wxSocketStream(wxSocketBase
& i_s
, wxSocketBase
& o_s
)
61 : wxSocketInputStream(i_s
), wxSocketOutputStream(o_s
)
65 wxSocketStream::wxSocketStream(wxSocketBase
& s
)
66 : wxSocketInputStream(s
), wxSocketOutputStream(s
)