34 #include <sys/types.h> 35 #include <sys/socket.h> 37 #include <netinet/in.h> 49 std::runtime_error((boost::format(
"Read operation on %s socket timed out") % sockname).str()) {
63 int put(
const void * ptr,
unsigned int size);
64 int get(
void * ptr,
unsigned int size);
66 int putRaw(
const void * ptr,
unsigned int size);
76 int getRaw(
const void * ptr,
unsigned int size,
unsigned int usec_timeout = 0);
82 int x = fcntl(conn_socket, F_GETFL, 0);
83 fcntl(conn_socket, F_SETFL, (x | O_NONBLOCK));
84 non_blocking_mode =
true;
88 int x = fcntl(conn_socket, F_GETFL, 0);
89 fcntl(conn_socket, F_SETFL, (x & ~O_NONBLOCK));
90 non_blocking_mode =
false;
94 struct sockaddr_in server_address, client_address;
97 struct timeval timeout;
99 int loopWrite(
int fd,
const void * ptr,
unsigned int nbytes);
108 int get(
void *ptr,
unsigned int size) {
110 if(rv < 0) ready =
false;
113 int put(
const void *ptr,
unsigned int size) {
116 if(rv < 0) ready =
false;
The Baseclass for all SoDa objects, and useful commonly used classes.
int put(const void *ptr, unsigned int size)
int put(const void *ptr, unsigned int size)
ReadTimeoutExc(std::string sockname)
int get(void *ptr, unsigned int size)