YAMI4Industry
Functions
network_utils.h File Reference
#include "callbacks.h"
#include "channel.h"
#include "common.h"
#include "limits.h"
#include "options.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Functions

enum yami_result yami_create_listener (const char target[], const struct yami_options *options, int32_t *out_socket, enum yami_protocol *out_protocol, yami_io_error_function io_error_callback)
 
enum yami_result yami_clean_listener (int32_t sock, yami_io_error_function io_error_callback)
 
enum yami_result yami_create_outgoing_connection (const char target[], const struct yami_options *options, int32_t *out_socket, enum yami_protocol *out_protocol, uint32_t *out_host, uint16_t *out_port, yami_io_error_function io_error_callback)
 
enum yami_result yami_accept_tcp (int32_t listening_sock, const struct yami_options *options, char out_target[], int32_t *out_socket, yami_io_error_function io_error_callback)
 
enum yami_result yami_clean_connection (int32_t sock, yami_io_error_function io_error_callback)
 
enum yami_result yami_write_tcp (int32_t sock, const uint8_t data[], size_t from, size_t to, size_t *out_written, yami_io_error_function io_error_callback)
 
enum yami_result yami_send_udp (int32_t sock, uint32_t host, uint16_t port, const uint8_t data[], size_t size, yami_io_error_function io_error_callback)
 
enum yami_result yami_read_tcp (int32_t sock, uint8_t out_data[], size_t from, size_t to, size_t *out_readn, yami_io_error_function io_error_callback)
 
enum yami_result yami_receive_udp (const int32_t sock, char out_target[], int32_t format_target, uint8_t out_data[], const size_t size, size_t *const out_readn, const yami_io_error_function io_error_callback)
 
enum yami_result yami_wait_for_work (struct yami_channel channels[], size_t channels_array_size, int32_t listening_sock, int32_t *out_listening_sock_ready, size_t timeout, yami_io_error_function io_error_callback)
 

Function Documentation

enum yami_result yami_accept_tcp ( int32_t  listening_sock,
const struct yami_options options,
char  out_target[],
int32_t *  out_socket,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_clean_connection ( int32_t  sock,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_clean_listener ( int32_t  sock,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_create_listener ( const char  target[],
const struct yami_options options,
int32_t *  out_socket,
enum yami_protocol out_protocol,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_create_outgoing_connection ( const char  target[],
const struct yami_options options,
int32_t *  out_socket,
enum yami_protocol out_protocol,
uint32_t *  out_host,
uint16_t *  out_port,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_read_tcp ( int32_t  sock,
uint8_t  out_data[],
size_t  from,
size_t  to,
size_t *  out_readn,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_receive_udp ( const int32_t  sock,
char  out_target[],
int32_t  format_target,
uint8_t  out_data[],
const size_t  size,
size_t *const  out_readn,
const yami_io_error_function  io_error_callback 
)
enum yami_result yami_send_udp ( int32_t  sock,
uint32_t  host,
uint16_t  port,
const uint8_t  data[],
size_t  size,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_wait_for_work ( struct yami_channel  channels[],
size_t  channels_array_size,
int32_t  listening_sock,
int32_t *  out_listening_sock_ready,
size_t  timeout,
yami_io_error_function  io_error_callback 
)
enum yami_result yami_write_tcp ( int32_t  sock,
const uint8_t  data[],
size_t  from,
size_t  to,
size_t *  out_written,
yami_io_error_function  io_error_callback 
)