mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
!255 修改accept函数,以适应在_WIN32环境的tcp server
Merge pull request !255 from SenySunny/master
This commit is contained in:
commit
28c76c9ee7
@ -68,6 +68,9 @@ void _socket_socket__accept(PikaObj* self) {
|
||||
__platform_printf("accept error\n");
|
||||
return;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
pika_platform_init_winsock();
|
||||
#endif
|
||||
obj_setInt(self, "client_sockfd", client_sockfd);
|
||||
obj_setStr(self, "client_addr", inet_ntoa(client_addr.sin_addr));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user