From ed6e77a7b4071e9ee925bd777235057e0acc3518 Mon Sep 17 00:00:00 2001 From: zzy <2450266535@qq.com> Date: Sun, 22 Oct 2023 19:55:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0version.txt,=E4=BF=AE?= =?UTF-8?q?=E6=94=B9README.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.txt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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