del: 将go版本的内容删除,只保留处理日志功能
This commit is contained in:
30
include/transport_udp.h
Normal file
30
include/transport_udp.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef OMNI_TRANSPORT_UDP_H
|
||||
#define OMNI_TRANSPORT_UDP_H
|
||||
|
||||
#include "latencylog.h"
|
||||
#include "linux_timestamping.h"
|
||||
#include "tx_timestamp_debug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct udp_conn udp_conn_t;
|
||||
|
||||
udp_conn_t *udp_conn_dial(const char *server_addr, const char *bind_ip, const char *bind_device, int enable_timestamping, latency_logger_t *logger, const char *node_role, const char *node_id, tx_timestamp_debug_logger_t *debug_logger);
|
||||
udp_conn_t *udp_conn_bind(const char *listen_addr, const char *bind_device, int enable_timestamping, latency_logger_t *logger, const char *node_role, const char *node_id, tx_timestamp_debug_logger_t *debug_logger);
|
||||
|
||||
int udp_conn_send(udp_conn_t *conn, const message_t *msg);
|
||||
int udp_conn_send_to(udp_conn_t *conn, const message_t *msg, const struct sockaddr *addr, socklen_t addr_len);
|
||||
int udp_conn_receive(udp_conn_t *conn, message_t *out_msg, struct sockaddr_storage *addr, socklen_t *addr_len);
|
||||
|
||||
int udp_conn_fd(const udp_conn_t *conn);
|
||||
int udp_conn_local_addr(const udp_conn_t *conn, struct sockaddr_storage *addr, socklen_t *addr_len);
|
||||
int udp_conn_close(udp_conn_t *conn);
|
||||
void udp_conn_free(udp_conn_t *conn);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user