#include #include #include #include #include #include #include #include #include #include #ifndef _KRAKEN_SOCKET_H #define _KRAKEN_SOCKET_H using namespace std; typedef struct sockaddr_in sockaddr_t; class KrakenSocket { public: KrakenSocket(int, int); ~KrakenSocket(); KrakenSocket *accept(void); bool bind(string, unsigned int); bool close(void); string getip(void); unsigned int getport(void); bool getsockopt(int); int *gettimeout(void); string gettype(void); bool isclosed(void); bool listen(unsigned int); string recv(unsigned int); bool send(string); bool send(unsigned char); bool setsockopt(int, bool); bool settimeout(int); private: KrakenSocket(int, sockaddr_t *); sockaddr_t *addr; bool closed; int sid; string socktype; }; #endif // _KRAKEN_SOCKET_H