#include <stdio.h>
#include <stdlib.h>
#include "BTAPI.h"
#include <string.h>
#include <sys/mman.h>
#include <iostream>
Functions | |
| int | set_last_X_SOCKET_ERROR (X_SOCKET *skt) |
| X_SOCKET * | socket_ok (X_SOCKET *pskt) |
| To check if pskt is X_SOCKET_FAILED or pskt is infested with errors. | |
| X_SOCKET * | x_socket (int socktype, X_SOCKET *skt) |
| To create a new instance of X_SOCKET. | |
| int | x_close (X_SOCKET *skt) |
| To close X_SOCKET *. | |
| int | x_connect (X_SOCKET *skt, const struct sockaddr *addr, int len) |
| Connect to a host specified by addr. | |
| int | x_bind (X_SOCKET *skt, const struct sockaddr *addr, int len) |
| Bind on port specified by addr. | |
| int | x_listen (X_SOCKET *skt, int backlog) |
| Listen for incoming connections. | |
| X_SOCKET * | x_accept (X_SOCKET *skt, struct sockaddr *addr, int *len) |
| Accept incoming connections. | |
| int | x_setsockopt (X_SOCKET *skt, int optname, void *optval=NULL, int optlen=0) |
| Set socket options. | |
| int | x_getsockopt (X_SOCKET *skt, int optname, void *optval, int *optlen) |
| Get socket options. | |
| X_STATS * | x_sockstats (X_SOCKET *skt) |
| Get transfer statistics of skt. | |
| int | x_sockerror (X_SOCKET *skt) |
| Check error status of skt. | |
| char * | x_errortext (int err) |
| Get error text corresponding to error number err. | |
| int | x_sendfile (X_SOCKET *skt, int fd, off_t offset, size_t size) |
| Send file using skt. | |
| int | x_send (X_SOCKET *skt, void *buf, size_t len) |
| Send data using skt. | |
| int | x_recvfile (X_SOCKET *skt, int fd, off_t offset, size_t size) |
| Receive file using skt. | |
| int | x_recv (X_SOCKET *skt, void *buf, size_t len) |
| receive data using skt | |
| int | x_selectmark (X_SOCKET *skt, int mark) |
| Mark socket for select. | |
| int | x_selecttest (X_SOCKET *skt) |
| Test select returned socket skt, for mark. | |
| int | x_select (int len, X_SOCKET **skts, struct timeval *timeout) |
| perform select call to test multiple sockets for I/O | |
|
|
sets the X_SOCKET_ERROR to the last library wide error if it is due to a socket Does not validate to check whether this was the socket which caused the error |
|
|
To check if pskt is X_SOCKET_FAILED or pskt is infested with errors.
|
|
||||||||||||||||
|
Accept incoming connections.
|
|
||||||||||||||||
|
Bind on port specified by addr.
|
|
|
To close X_SOCKET *.
|
|
||||||||||||||||
|
Connect to a host specified by addr.
|
|
|
Get error text corresponding to error number err.
|
|
||||||||||||||||||||
|
Get socket options.
|
|
||||||||||||
|
Listen for incoming connections.
|
|
||||||||||||||||
|
receive data using skt
|
|
||||||||||||||||||||
|
Receive file using skt.
|
|
||||||||||||||||
|
perform select call to test multiple sockets for I/O
|
|
||||||||||||
|
Mark socket for select.
|
|
|
Test select returned socket skt, for mark.
|
|
||||||||||||||||
|
Send data using skt.
|
|
||||||||||||||||||||
|
Send file using skt.
|
|
||||||||||||||||||||
|
Set socket options.
|
|
|
Check error status of skt.
|
|
||||||||||||
|
To create a new instance of X_SOCKET.
|
|
|
Get transfer statistics of skt.
|
1.4.3-20050530