#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
Go to the source code of this file.
Functions |
int | cf_socket_read_timeout (int fd, uint8_t *buf, size_t buf_len, uint64_t trans_deadline, int attempt_ms) |
int | cf_socket_write_timeout (int fd, uint8_t *buf, size_t buf_len, uint64_t trans_deadline, int attempt_ms) |
int | cf_socket_read_forever (int fd, uint8_t *buf, size_t buf_len) |
int | cf_socket_write_forever (int fd, uint8_t *buf, size_t buf_len) |
void | cf_print_sockaddr_in (char *prefix, struct sockaddr_in *sa_in) |
int | cf_socket_create_nb () |
int | cf_socket_start_connect_nb (int fd, struct sockaddr_in *sa) |
int | cf_socket_create_and_connect_nb (struct sockaddr_in *sa) |
Macro Definition Documentation
#define cf_close |
( |
|
fd | ) |
(close(fd)) |
#define cf_socket_data_t void |
#define cf_socket_size_t size_t |
Function Documentation
void cf_print_sockaddr_in |
( |
char * |
prefix, |
|
|
struct sockaddr_in * |
sa_in |
|
) |
| |
int cf_socket_create_and_connect_nb |
( |
struct sockaddr_in * |
sa | ) |
|
int cf_socket_create_nb |
( |
| ) |
|
int cf_socket_read_forever |
( |
int |
fd, |
|
|
uint8_t * |
buf, |
|
|
size_t |
buf_len |
|
) |
| |
int cf_socket_read_timeout |
( |
int |
fd, |
|
|
uint8_t * |
buf, |
|
|
size_t |
buf_len, |
|
|
uint64_t |
trans_deadline, |
|
|
int |
attempt_ms |
|
) |
| |
int cf_socket_start_connect_nb |
( |
int |
fd, |
|
|
struct sockaddr_in * |
sa |
|
) |
| |
int cf_socket_write_forever |
( |
int |
fd, |
|
|
uint8_t * |
buf, |
|
|
size_t |
buf_len |
|
) |
| |
int cf_socket_write_timeout |
( |
int |
fd, |
|
|
uint8_t * |
buf, |
|
|
size_t |
buf_len, |
|
|
uint64_t |
trans_deadline, |
|
|
int |
attempt_ms |
|
) |
| |