mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add socket.netstat
This commit is contained in:
28
skynet-src/socket_info.h
Normal file
28
skynet-src/socket_info.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef socket_info_h
|
||||
#define socket_info_h
|
||||
|
||||
#define SOCKET_INFO_UNKNOWN 0
|
||||
#define SOCKET_INFO_LISTEN 1
|
||||
#define SOCKET_INFO_TCP 2
|
||||
#define SOCKET_INFO_UDP 3
|
||||
#define SOCKET_INFO_BIND 4
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct socket_info {
|
||||
int id;
|
||||
int type;
|
||||
uint64_t opaque;
|
||||
uint64_t read;
|
||||
uint64_t write;
|
||||
uint64_t rtime;
|
||||
uint64_t wtime;
|
||||
int64_t wbuffer;
|
||||
char name[128];
|
||||
struct socket_info *next;
|
||||
};
|
||||
|
||||
struct socket_info * socket_info_create(struct socket_info *last);
|
||||
void socket_info_release(struct socket_info *);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user