diff options
author | deva <deva> | 2006-06-09 18:20:51 +0000 |
---|---|---|
committer | deva <deva> | 2006-06-09 18:20:51 +0000 |
commit | 8f9101869f6b460f61033ce434bba0a793d25137 (patch) | |
tree | fd07cb44be0b01da339f79164c323793d72ab4a9 /src/aa_socket.h | |
parent | 6c31ad03de714676516d69ae9114e8bdd67c0d96 (diff) |
Moved files to other folder:
lib - Shared files between server and client
client - Client files
server - Server files
Diffstat (limited to 'src/aa_socket.h')
-rw-r--r-- | src/aa_socket.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/aa_socket.h b/src/aa_socket.h deleted file mode 100644 index 0d02723..0000000 --- a/src/aa_socket.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __SOCKET_H__ -#define __SOCKET_H__ - -#include <string> - -#include <netinet/in.h> -//#include <sys/socket.h> - - -/** - * Exceptions - */ -struct Network_error { - Network_error(char *event, char *err) { - error = std::string(err) + " - in " + std::string(event); - } - std::string error; -}; - -class AASocket { -public: - AASocket(); - ~AASocket(); - - void listen(unsigned short port); - void connect(char *ip, unsigned short port); - - void send(char* buf, unsigned int buf_size); - int receive(char* buf, unsigned int buf_size); - - void send_string(std::string buf); - std::string receive_string(); - - void force_close(); - -private: - struct sockaddr_in socketaddr; - int socket; - int bind_socket; // Tmp socket for listen. -}; - -#endif/*__SOCKET_H__*/ |