|
Public Methods |
| dsSocket (const char *host, const int port, const int proto=IPPROTO_TCP) |
| dsSocket () |
virtual | ~dsSocket () |
void | Open (const int proto=IPPROTO_UDP, const int fcntl_flags=0) |
virtual void | Connect (const char *host, const int port, const int proto=IPPROTO_TCP) |
virtual void | Close () |
virtual size_t | __read (char *buf, size_t bytes) |
virtual size_t | __write (const char *ptr, size_t bytes) |
virtual size_t | __sendto (const char *buf, size_t bytes, const sockaddr *to, socklen_t len) |
size_t | Sendto (const char *ptr, size_t bytes, const char *host, const int port) |
unsigned long | getip () |
unsigned long | getpeerip () |
unsigned int | getport () |
char * | getpeer_aip () |
char * | get_aip () |
int | fd () const |
size_t | Read (char *buffer, size_t bytes, int sec=10, int usec=0) |
size_t | Read (std::ostream &os, int sec=10, int usec=0) |
size_t | Write (const char *buffer, size_t bytes, int sec=10, int usec=0) |
size_t | Write (std::istream &is, int sec=10, int usec=0) |
size_t | Write (const char *str, int sec=10, int usec=0) |
size_t | Printf (const char *format,...) |
size_t | ReadLine (std::ostream &os, int sec=10) |
size_t | ReadLine (char *buf, size_t size, int sec=10) |
size_t | WriteLine (std::istream &is, int sec=10) |
size_t | WriteLine (const char *str, int sec=10) |
Protected Attributes |
sockaddr_in | _sockAddr |
hostent * | _pHostEnt |
int | _sock |