48 struct sockaddr_in server_addr;
Common data structures and type definitions for the C3E library.
double c3e_number
A type representing a numerical value in C3E. Defaults to double precision.
Definition commons.h:50
void c3e_socket_close(c3e_socket *socket)
Closes the network socket.
c3e_vector * c3e_socket_vector_read(c3e_socket *socket)
Receives and deserializes a vector object from the socket.
c3e_tensor * c3e_socket_tensor_read(c3e_socket *socket)
Receives and deserializes a tensor object from the socket.
bool c3e_socket_send_data(c3e_socket *socket, const void *data, size_t size)
Sends data through the socket.
void c3e_socket_send_vector(c3e_socket *socket, c3e_vector *vector)
Sends a vector object through the socket.
void c3e_socket_send_tensor(c3e_socket *socket, c3e_tensor *tensor)
Sends a tensor object through the socket.
void c3e_socket_send_number(c3e_socket *socket, c3e_number number)
Sends a numerical value over a socket connection.
void c3e_socket_init(c3e_socket *socket, const char *hostname, int port)
Initializes a socket with the specified hostname and port.
c3e_number c3e_socket_number_read(c3e_socket *socket)
Receives a numerical value from a socket connection.
void c3e_socket_send_matrix(c3e_socket *socket, c3e_matrix *matrix)
Sends a matrix object through the socket.
c3e_matrix * c3e_socket_matrix_read(c3e_socket *socket)
Receives and deserializes a matrix object from the socket.
bool c3e_socket_receive_data(c3e_socket *socket, void *buffer, size_t size)
Receives data from the socket.
Represents a mathematical matrix.
Definition commons.h:74
Represents a network socket for communication.
Definition net.h:44
char * hostname
The hostname or IP address of the server.
Definition net.h:45
int port
The port number on which the server is listening.
Definition net.h:46
int sockfd
The file descriptor for the socket.
Definition net.h:47
Represents a tensor, a multi-dimensional array of numerical values.
Definition commons.h:111
Represents a mathematical vector.
Definition commons.h:62