add socket.netstat

This commit is contained in:
Cloud Wu
2018-09-07 16:11:27 +08:00
parent 35176383b7
commit 61980c8a1f
9 changed files with 299 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
#ifndef skynet_socket_h
#define skynet_socket_h
#include "socket_info.h"
struct skynet_context;
#define SKYNET_SOCKET_TYPE_DATA 1
@@ -22,6 +24,7 @@ void skynet_socket_init();
void skynet_socket_exit();
void skynet_socket_free();
int skynet_socket_poll();
void skynet_socket_updatetime();
int skynet_socket_send(struct skynet_context *ctx, int id, void *buffer, int sz);
int skynet_socket_send_lowpriority(struct skynet_context *ctx, int id, void *buffer, int sz);
@@ -38,4 +41,6 @@ int skynet_socket_udp_connect(struct skynet_context *ctx, int id, const char * a
int skynet_socket_udp_send(struct skynet_context *ctx, int id, const char * address, const void *buffer, int sz);
const char * skynet_socket_udp_address(struct skynet_socket_message *, int *addrsz);
struct socket_info * skynet_socket_info();
#endif