#include "communicate.h"#include "signal.h"#include "util.h"#include "log.h"#include <sys/stat.h>#include <sys/types.h>#include <sys/socket.h>#include <unistd.h>#include <errno.h>#include <time.h>#include <netdb.h>#include <iostream>#include <netinet/in.h>#include <arpa/inet.h>#include <fcntl.h>| Classes | |
| class | file_conn | 
| Read and write files as connection.  More... | |
| class | socket_conn | 
| Read and write data over a normal internet socket.  More... | |
| class | tls_conn | 
| Read and write data over a secured socket.  More... | |
| Defines | |
| #define | DEBUG_ROUTINE "communicate" | 
| #define | MAXDATA 10240 | 
| #define | DH_BITS 1024 | 
| #define | dfile(filename) (data_dir+"/"+filename).c_str() | 
| Functions | |
| void | set_blocking (int fileno, bool blocking) | 
| Set the given file descriptor to block or unblock. | |
| bool | is_nonblocking_error () | 
| char * | fd_load (int fd, size_t *psize, size_t maxsize) | 
| char * | file_load (const char *fname, size_t *size, size_t maxsize) | 
| Variables | |
| int | tls_init = false | 
| const int | cert_type_priority [2] = { GNUTLS_CRT_X509, 0 } | 
| const int | kx_prio [] = { GNUTLS_KX_DHE_DSS, 0 } | 
| const int | mac_prio [] = { GNUTLS_MAC_SHA1, 0 } | 
| #define DEBUG_ROUTINE "communicate" | 
| #define dfile | ( | filename | ) | (data_dir+"/"+filename).c_str() | 
| #define DH_BITS 1024 | 
| #define MAXDATA 10240 | 
| char* fd_load | ( | int | fd, | |
| size_t * | psize, | |||
| size_t | maxsize | |||
| ) | 
| char* file_load | ( | const char * | fname, | |
| size_t * | size, | |||
| size_t | maxsize | |||
| ) | 
| bool is_nonblocking_error | ( | void | ) |  [inline] | 
| void set_blocking | ( | int | fileno, | |
| bool | blocking | |||
| ) | 
Set the given file descriptor to block or unblock.
| const int cert_type_priority[2] = { GNUTLS_CRT_X509, 0 } | 
| const int kx_prio[] = { GNUTLS_KX_DHE_DSS, 0 } | 
| const int mac_prio[] = { GNUTLS_MAC_SHA1, 0 } | 
| int tls_init = false | 
Generated on Tue Jan 1 17:30:01 2008 for general/communicate.cc File Reference by   Visit the project page on
  
Visit the project page on