MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Classes | Typedefs | Functions

Simple implementation for reading and writing to a tcp client socket. More...

Classes

struct  tcp_socket
 

Typedefs

typedef struct tcp_socket tcp_socket
 

Functions

void tcp_socket_init (tcp_socket *socket_ptr)
 
bool tcp_socket_is_open (const tcp_socket *socket_ptr)
 
bool tcp_socket_open (tcp_socket *socket_ptr, const char *hostname, uint16_t port, unsigned int timeout_ms)
 
bool tcp_socket_close (tcp_socket *socket_ptr)
 
bool tcp_socket_send (tcp_socket *socket_ptr, const void *buffer, size_t num_bytes, size_t *bytes_written)
 
bool tcp_socket_recv (tcp_socket *socket_ptr, void *buffer, size_t num_bytes, size_t *bytes_read)
 

Detailed Description

Simple implementation for reading and writing to a tcp client socket.

Typedef Documentation

◆ tcp_socket

typedef struct tcp_socket tcp_socket

Function Documentation

◆ tcp_socket_close()

bool tcp_socket_close ( tcp_socket socket_ptr)

◆ tcp_socket_init()

void tcp_socket_init ( tcp_socket socket_ptr)

◆ tcp_socket_is_open()

bool tcp_socket_is_open ( const tcp_socket socket_ptr)

◆ tcp_socket_open()

bool tcp_socket_open ( tcp_socket socket_ptr,
const char *  hostname,
uint16_t  port,
unsigned int  timeout_ms 
)

◆ tcp_socket_recv()

bool tcp_socket_recv ( tcp_socket socket_ptr,
void *  buffer,
size_t  num_bytes,
size_t *  bytes_read 
)

◆ tcp_socket_send()

bool tcp_socket_send ( tcp_socket socket_ptr,
const void *  buffer,
size_t  num_bytes,
size_t *  bytes_written 
)