cpp utils files, network and a smal util class

This commit is contained in:
Ziver Koc 2009-11-21 01:11:05 +00:00
parent ea3dffdb4a
commit 62f50a2f79
13 changed files with 610 additions and 0 deletions

30
net/socket.h Normal file
View file

@ -0,0 +1,30 @@
#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