diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-21 19:23:33 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-21 19:23:33 +0000 |
commit | 7e99fac4552b402034e5fc3e833cbe8c274f95ce (patch) | |
tree | 15cdf32bdbfd690bcb4d841fe60f404b25cdd208 /src/net/tcpclient.h | |
parent | cb52e5bd8da01ab2e7976fcd8bfc34e190265ed5 (diff) |
removed
Diffstat (limited to 'src/net/tcpclient.h')
-rw-r--r-- | src/net/tcpclient.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/net/tcpclient.h b/src/net/tcpclient.h deleted file mode 100644 index 943531e..0000000 --- a/src/net/tcpclient.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - net/tcpclient.h - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 -*/ - -#ifndef __INCLUDED_NET_TCPCLIENT_H__ -#define __INCLUDED_NET_TCPCLIENT_H__ - -#include <string> - -namespace net -{ - -/// A TCP client, connected to a file descriptor -class TCPClient -{ -public: - /// A new TCP client, connected to a file descriptor - TCPClient(int tcpclientfd); - - /// Delete the TCP client - /// If the file descriptor is still open, it will be closed. - virtual ~TCPClient(); - - /// Returns the error state - bool error() const; - - /// Returns true if the TCP client has a valid file descriptor - bool valid() const; - - /// Returns true if the TCP client has an invalid file descriptor - bool invalid() const; - - /// Returns the file descriptor the TCP client is connected to - int fd() const; - - /// Sets the error state - void abort(); - - /// Sends outgoing data - virtual void send(std::string const &msg); - - /// receives incoming data - virtual void receive(std::string &msg); - -protected: - /// Called by receive() when the client has disconnected - /// @see receive - virtual void client_disconnect(); - -private: - int tcpclient_fd; - bool tcpclient_error; -}; - -} - -#endif //__INCLUDED_CORE_TCPCLIENT_H__ |