25 #ifndef COMMUNICATION_H
26 #define COMMUNICATION_H
30 #include <netinet/ip.h>
ssize_t send_to_endpoint(int fd, void *data, size_t data_len)
Writes a buffer of a given size to a file descriptor.
int init_bound_socket(int port)
Initializes a socket which is bound to a given port (and any local IP address).
int init_listening_socket(int port)
Initializes a socket which is bound to and listening on the given port.
int init_connected_socket(struct sockaddr_in *addr)
Initializes a socket that is connected to a given address.
int read_payload(int fd, size_t size, void *buff)
Reads a buffer of a given size from a file descriptor.