30 lines
649 B
C++
30 lines
649 B
C++
#ifndef ZUTIL_NET_SOCKET
|
|
#define ZUTIL_NET_SOCKET
|
|
|
|
#include "socketio.h"
|
|
#include "socketexception.h"
|
|
#include "socketstream.h"
|
|
using namespace std;
|
|
|
|
namespace zutil{
|
|
class Socket : public SocketIO{
|
|
protected:
|
|
SocketStreamBuffer *streambuf;
|
|
istream *in;
|
|
ostream *out;
|
|
public:
|
|
Socket( string host, int port );
|
|
explicit Socket();
|
|
virtual ~Socket();
|
|
|
|
istream& get_istream();
|
|
ostream& get_ostream();
|
|
|
|
const Socket& operator<<( const string& ) const;
|
|
const Socket& operator<<( const char ) const;
|
|
const Socket& operator>>( string& ) const;
|
|
const Socket& operator>>( char& ) const;
|
|
};
|
|
}
|
|
|
|
#endif
|