diff --git a/README.txt b/README.txt index b61ab66..d3adfdb 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,8 @@ 提供ssocket.h库文件以供在windows和linux帮助tcp-ipv4的实现 未来将提供udp-ipv4及相应ipv6实现 +版本号:1.0.2 + 测试用例: 在test文件夹下有client和server文件夹在其内部的build文件夹下有用于windows的vs工程文件 所有test用例使用cmake构建 @@ -53,7 +55,12 @@ make_sock(psock); ... free(psock); - + 同理: + int make_sock_tcp4(SOCKET* sock); + int make_sock_tcp6(SOCKET* sock); + int make_sock_udp4(SOCKET* sock); + int make_sock_udp6(SOCKET* sock); + int make_server_sock(SOCKET* sock, const char* server_ip, unsigned short port) 作用: 提供sock变量的地址,服务器的IP(若为NULL则默认为所有地址),服务器监听的端口号(0-65535) @@ -115,3 +122,12 @@ int* data = malloc(sizeof(int)); sock_thread(thread_func, data); } + + +内置函数文档 +static inline int _socket(SOCKET* sock, const char* ip, const char* port); +static inline int _connect(SOCKET sock, const char* ip, const char* port); +static inline int _bind(SOCKET sock, const char* ip, const char* port); +static inline int _bindlisten(SOCKET sock, const char* ip, const char* port); + +static inline int _sock(SOCKET* sock, int af, int type); \ No newline at end of file