9 #include <sys/socket.h>    11 #include <arpa/inet.h>    30       std::deque<std::string> 
data;
    33       unsigned int bytes(
unsigned int max);
    34       void append(
const std::string & newdata);
    35       void append(
const char * newdata, 
const unsigned int newdatasize);
    36       void prepend(
const std::string & newdata);
    37       void prepend(
const char * newdata, 
const unsigned int newdatasize);
    39       bool available(
unsigned int count);
    40       std::string 
remove(
unsigned int count);
    41       std::string copy(
unsigned int count);
    56       int iread(
void * buffer, 
int len, 
int flags = 0); 
    57       unsigned int iwrite(
const void * buffer, 
int len); 
    58       bool iread(
Buffer & buffer, 
int flags = 0); 
    59       bool iwrite(std::string & buffer); 
    62       friend class ::Buffer::user;
    66       Connection(std::string hostname, 
int port, 
bool nonblock); 
    67       Connection(std::string adres, 
bool nonblock = 
false); 
    72       void setBlocking(
bool blocking); 
    74       std::string getHost() 
const; 
    75       std::string getBinHost();
    76       void setHost(std::string host); 
    79       std::string getError(); 
    80       bool connected() 
const; 
    81       bool isAddress(std::string addr);
    86       void SendNow(
const std::string & data); 
    87       void SendNow(
const char * data); 
    88       void SendNow(
const char * data, 
size_t len); 
    90       unsigned int connTime();
    91       unsigned int dataUp(); 
    92       unsigned int dataDown(); 
    93       std::string getStats(std::string C); 
   100       operator bool() 
const;
   108       bool IPv6bind(
int port, std::string hostname, 
bool nonblock); 
   109       bool IPv4bind(
int port, std::string hostname, 
bool nonblock); 
   112       Server(
int port, std::string hostname = 
"0.0.0.0", 
bool nonblock = 
false); 
   113       Server(std::string adres, 
bool nonblock = 
false); 
   115       void setBlocking(
bool blocking); 
   116       bool connected() 
const; 
   140       int bind(
int port, std::string iface = 
"", 
const std::string & multicastAddress = 
"");
   141       void setBlocking(
bool blocking);
   142       void SetDestination(std::string hostname, uint32_t port);
   143       void GetDestination(std::string & hostname, uint32_t & port);
   145       void SendNow(
const std::string & data);
   146       void SendNow(
const char * data);
   147       void SendNow(
const char * data, 
size_t len);
 
Buffer downbuffer
Stores temporary data coming in. 
Definition: socket.h:55
void * destAddr
Destination address pointer. 
Definition: socket.h:127
unsigned int up
Definition: socket.h:52
bool Error
Set to true if a socket error happened. 
Definition: socket.h:95
char * data
Holds the last received packet. 
Definition: socket.h:134
long long int conntime
Definition: socket.h:54
unsigned int up
Amount of bytes transferred up. 
Definition: socket.h:129
std::deque< std::string > data
Definition: socket.h:30
unsigned int data_len
The size in bytes of the last received packet. 
Definition: socket.h:135
int sock
Internally saved socket number. 
Definition: socket.h:125
int sock
Internally saved socket number. 
Definition: socket.h:49
This class is for easily setting up listening socket, either TCP or Unix. 
Definition: socket.h:104
bool Blocking
Set to true if a socket is currently or wants to be blocking. 
Definition: socket.h:96
unsigned int down
Definition: socket.h:53
Holds Socket tools. 
Definition: socket.h:25
std::string remotehost
Stores remote host address. 
Definition: socket.h:126
unsigned int data_size
The size in bytes of the allocated space in the data pointer. 
Definition: socket.h:131
int sock
Internally saved socket number. 
Definition: socket.h:107
std::string errors
Stores errors that may have occured. 
Definition: socket.h:106
unsigned int down
Amount of bytes transferred down. 
Definition: socket.h:130
unsigned int destAddr_size
Size of the destination address pointer. 
Definition: socket.h:128
std::string remotehost
Stores remote host address. 
Definition: socket.h:51
This class is for easy communicating through sockets, either TCP or Unix. 
Definition: socket.h:47
Canvas prototype clear
Definition: jquery.flot.min.js:1
bool isIPv6
Definition: socket.h:132