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);
    51       std::string remotehost; 
    54       long long int conntime;
    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;
    65       Connection(
int sockNo); 
    66       Connection(std::string hostname, 
int port, 
bool nonblock); 
    67       Connection(std::string adres, 
bool nonblock = 
false); 
    68       Connection(
int write, 
int read); 
    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); 
    98       bool operator==(
const Connection & B) 
const;
    99       bool operator!=(
const Connection & B) 
const;
   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); 
   114       Connection accept(
bool nonblock = 
false); 
   115       void setBlocking(
bool blocking); 
   116       bool connected() 
const; 
   123   class UDPConnection {
   126       std::string remotehost;
   128       unsigned int destAddr_size;
   131       unsigned int data_size;
   135       unsigned int data_len; 
   136       UDPConnection(
const UDPConnection & o);
   137       UDPConnection(
bool nonblock = 
false);
   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);
 
Holds Socket tools. 
Definition: socket.h:25
Canvas prototype clear
Definition: jquery.flot.min.js:1