#include <vector>
Go to the source code of this file.
Typedefs | |
typedef std::pair< uint32_t, uint16_t > | AddressPortPair |
Functions | |
int | GetFileSize (const std::string &sFile) |
std::string | GetDotFormatIP (uint32_t ip) |
void | reuse (int fd) |
void | nonblock (int fd) |
void | nodelay (int fd) |
void | ByteOrderTesting () |
int | RunAsDaemon (const char *stdoutname) |
int | write_pid (const char *sFileName) |
AddressPortPair | GetSockName (uint32_t sock) |
int | StringTokenizer (const std::string sToParse, const char *cToken, std::vector< std::string > &v) |
std::string GetDotFormatIP | ( | uint32_t | ip | ) |
Gets the dot formatted IP address as a string from int IP.
int GetFileSize | ( | const std::string & | sFile | ) |
Gets the file size in bytes of a given file.
AddressPortPair GetSockName | ( | uint32_t | sock | ) |
Gets the ip and port from a socket. Useful for debugging.
void nodelay | ( | int | fd | ) |
Disables nagle's algorithm.
void nonblock | ( | int | fd | ) |
Set the socket for as non blocking.
void reuse | ( | int | fd | ) |
Set the socket for reusing.
int RunAsDaemon | ( | const char * | stdoutname | ) |
Makes the current process as a daemon.
int StringTokenizer | ( | const std::string | sToParse, | |
const char * | cToken, | |||
std::vector< std::string > & | v | |||
) |
Special string tokenizer; not generic.