* Added wxsocket lib and sample (I hope I don't forget some file)

* Updated some wx data and makefiles
* Updates on wxStream (reorganization)
 makefile for Windows will nearly follow
 wxSocket should work on wxGTK (I've tested it)

* IPC over Network is included


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1998-09-06 18:28:00 +00:00
parent 560b92f577
commit f4ada56822
42 changed files with 5667 additions and 36 deletions

68
src/common/sckstrm.cpp Normal file
View File

@@ -0,0 +1,68 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sckstrm.h
// Purpose: wxSocket*Stream
// Author: Guilhem Lavaux
// Modified by:
// Created: 17/07/97
// RCS-ID: $Id$
// Copyright: (c)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "sckstrm.h"
#endif
#include "wx/stream.h"
#include "wx/socket.h"
#include "wx/sckstrm.h"
// ---------------------------------------------------------------------------
// wxSocketOutputStream
// ---------------------------------------------------------------------------
wxSocketOutputStream::wxSocketOutputStream(wxSocketBase& s)
: m_o_socket(&s)
{
}
wxSocketOutputStream::~wxSocketOutputStream()
{
}
wxOutputStream& wxSocketOutputStream::Write(const void *buffer, size_t size)
{
m_o_socket->Write((const char *)buffer, size);
return *this;
}
// ---------------------------------------------------------------------------
// wxSocketInputStream
// ---------------------------------------------------------------------------
wxSocketInputStream::wxSocketInputStream(wxSocketBase& s)
: m_i_socket(&s)
{
}
wxSocketInputStream::~wxSocketInputStream()
{
}
wxInputStream& wxSocketInputStream::Read(void *buffer, size_t size)
{
m_i_socket->Read((char *)buffer, size);
return *this;
}
// ---------------------------------------------------------------------------
// wxSocketStream (IO)
// ---------------------------------------------------------------------------
wxSocketStream::wxSocketStream(wxSocketBase& i_s, wxSocketBase& o_s)
: wxSocketInputStream(i_s), wxSocketOutputStream(o_s)
{
}
wxSocketStream::wxSocketStream(wxSocketBase& s)
: wxSocketInputStream(s), wxSocketOutputStream(s)
{
}