#include <stdio.h>#include <stdlib.h>#include <string.h>#include <signal.h>#include <unistd.h>#include <fcntl.h>#include <errno.h>#include <ctype.h>#include <netdb.h>#include <sys/time.h>#include <sys/types.h>#include <sys/resource.h>#include <sys/wait.h>#include <sys/param.h>#include <sys/socket.h>#include <netinet/in.h>#include <netinet/tcp.h>#include <arpa/inet.h>#include <ngc/core/ngcbSocket.h>Macros | |
| #define | _GNU_SOURCE |
| #define | _REENTRANT |
Functions | |
| int | ngcbTcpService (const char *service, char *erms) |
| int | ngcbTcpAccept (int fd, char *erms) |
| int | ngcbTcpConnect (const char *service, char *erms) |
| int | ngcbTcpConnectTmo (const char *service, int tmo, char *erms) |
| int | ngcbTcpClose (int fd) |
| int | ngcbTcpRead (int fd, void *buffer, size_t size, char *erms) |
| int | ngcbTcpWrite (int fd, const void *buffer, size_t size, char *erms) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| int ngcbTcpAccept | ( | int | fd, |
| char * | erms ) |
Accept a tcp/ip client connection request and return the client socket.
| int ngcbTcpClose | ( | int | fd | ) |
Close tcp/ip socket.
| int ngcbTcpConnect | ( | const char * | service, |
| char * | erms ) |
Connect to a tcp/ip socket service specified in the format "host:port". The function returns a client socket descriptor.
| int ngcbTcpConnectTmo | ( | const char * | service, |
| int | tmo, | ||
| char * | erms ) |
Cnnects to a tcp/ip socket service specified in the format "host:port". The function returns a client socket descriptor. The connect timeout is given in seconds. Zero or a negavitve number falls back to the default connection timeout as provided by the OS.
| int ngcbTcpRead | ( | int | fd, |
| void * | buffer, | ||
| size_t | size, | ||
| char * | erms ) |
Read size bytes of from tcp/ip socket into buffer.
| int ngcbTcpService | ( | const char * | service, |
| char * | erms ) |
Open a tcp/ip server socket.
| int ngcbTcpWrite | ( | int | fd, |
| const void * | buffer, | ||
| size_t | size, | ||
| char * | erms ) |
Write size bytes of buffer to tcp/ip socket.