#include "config.h"#include "hostlookup.h"#include "transport.h"#include "log.h"#include "womalloc.h"#include <string.h>#include <errno.h>#include <sys/time.h>#include <sys/types.h>#include <sys/socket.h>#include <unistd.h>#include <sys/uio.h>#include <netinet/tcp.h>#include <netinet/in.h>#include <fcntl.h>

Classes | |
| struct | _netfd |
Defines | |
| #define | closeSocket(sd) close(sd) |
| #define | net_fd netfd * |
| #define | NETBUFSZ 16384 |
| #define | WA_brokenPipe(error) (error == EPIPE) |
| #define | WA_connectionReset(error) (error == ECONNRESET) |
| #define | WA_inProgress(error) (error == EINPROGRESS) |
| #define | WA_intr(error) (error == EINTR) |
| #define | WA_msgSize(error) (error == EMSGSIZE) |
| #define | WA_wouldBlock(error) (error == EWOULDBLOCK || error == EAGAIN) |
Typedefs | |
| typedef struct _netfd | netfd |
Functions | |
| static void | closeapp (net_fd s) |
| static TR_STATUS | connectionStatus (net_fd s) |
| static void | fillbuf (net_fd appfd) |
| static TR_STATUS | flush (net_fd s) |
| static int | nonBlockingConnectHostent (int sd, int connectTimeout, struct hostent *hostentry, unsigned int port) |
| static int | nonBlockingRecv (net_fd appfd, int receiveTimeout, char *input_buffer, int ib_capacity) |
| static net_fd | openapp (const char *hostName, int port, unsigned short cto, unsigned short sto, unsigned short rto, int sbufsiz, int rbufsiz) |
| static int | recvbytes (net_fd s, char *buf, int maxlen) |
| static String * | recvline (net_fd s) |
| static TR_STATUS | reset (net_fd appfd) |
| static TR_STATUS | sendBuffers (net_fd appfd, struct iovec *buffers, int bufferCount) |
| static TR_STATUS | sendbytes (net_fd appfd, const char *buf, int len) |
| static TR_STATUS | sendline (net_fd s, const char *buf) |
| static int | setBlockingState (int sd, int wantNonBlocking) |
Variables | |
| wotransport | tr_nbsocket |
| #define closeSocket | ( | sd | ) | close(sd) |
| #define NETBUFSZ 16384 |
| #define WA_brokenPipe | ( | error | ) | (error == EPIPE) |
| #define WA_connectionReset | ( | error | ) | (error == ECONNRESET) |
| #define WA_inProgress | ( | error | ) | (error == EINPROGRESS) |
| #define WA_intr | ( | error | ) | (error == EINTR) |
| #define WA_msgSize | ( | error | ) | (error == EMSGSIZE) |
| #define WA_wouldBlock | ( | error | ) | (error == EWOULDBLOCK || error == EAGAIN) |
| static void closeapp | ( | net_fd | s | ) | [static] |
| static void fillbuf | ( | net_fd | appfd | ) | [static] |
| static int nonBlockingConnectHostent | ( | int | sd, | |
| int | connectTimeout, | |||
| struct hostent * | hostentry, | |||
| unsigned int | port | |||
| ) | [static] |
| static int nonBlockingRecv | ( | net_fd | appfd, | |
| int | receiveTimeout, | |||
| char * | input_buffer, | |||
| int | ib_capacity | |||
| ) | [static] |
| static net_fd openapp | ( | const char * | hostName, | |
| int | port, | |||
| unsigned short | cto, | |||
| unsigned short | sto, | |||
| unsigned short | rto, | |||
| int | sbufsiz, | |||
| int | rbufsiz | |||
| ) | [static] |
| static int recvbytes | ( | net_fd | s, | |
| char * | buf, | |||
| int | maxlen | |||
| ) | [static] |
| static int setBlockingState | ( | int | sd, | |
| int | wantNonBlocking | |||
| ) | [static] |
Initial value:
{
"nbsocket",
"non-blocking socket",
NULL,
openapp,
closeapp,
reset,
sendline,
recvline,
sendbytes,
recvbytes,
flush,
sendBuffers,
connectionStatus
}
1.5.8