RTRlib
Loading...
Searching...
No Matches
transport_private.h File Reference
#include "transport.h"
#include <time.h>

Go to the source code of this file.

Functions

int tr_open (struct tr_socket *socket)
 Establish the connection.
 
void tr_close (struct tr_socket *socket)
 Close the socket connection.
 
void tr_free (struct tr_socket *socket)
 Deallocates all memory that the passed socket uses.
 
int tr_recv (const struct tr_socket *socket, void *buf, const size_t len, const time_t timeout)
 Receives <= len Bytes data from the socket.
 
int tr_send (const struct tr_socket *socket, const void *pdu, const size_t len, const time_t timeout)
 Send <= len Bytes data over the socket.
 
int tr_send_all (const struct tr_socket *socket, const void *pdu, const size_t len, const time_t timeout)
 Repeatedly calls tr_send(..) till len Bytes were sent, the timeout expired or an error occurred.
 
int tr_recv_all (const struct tr_socket *socket, const void *buf, const size_t len, const time_t timeout)
 Repeatedly calls tr_recv(..) till len Bytes were received, the timeout expired or an error occurred.
 
const char * tr_ident (struct tr_socket *socket)
 Returns an identifier for the socket endpoint, eg host:port.