socket.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029 #ifndef SOCKETIRC_H
00030 #define SOCKETIRC_H
00031
00032 #include <stdio.h>
00033 #include <stdlib.h>
00034 #include <unistd.h>
00035 #include <sys/types.h>
00036 #include <sys/socket.h>
00037 #include <netinet/in.h>
00038 #include <arpa/inet.h>
00039 #include <netdb.h>
00040 #include <errno.h>
00041 #include <string.h>
00042 #include <iostream>
00043 #include <string>
00044 #include "tools.h"
00045 using namespace std ;
00046
00053 class Socket
00054 {
00055 public :
00057 Socket();
00059 ~Socket();
00061 bool sendStr(string);
00063 bool closeSock();
00065 bool connectSock(int,string,string);
00067 bool getState();
00069 string receive();
00070 private :
00072 bool state;
00074 int mySock ;
00075 };
00076
00077 #endif