Update the return values of socket.listen, also return the real port bind to zero (#1638)

This commit is contained in:
zaxbbun
2022-09-03 07:19:03 +08:00
committed by GitHub
parent 6bd6f53ab8
commit c1eeba215d
10 changed files with 30 additions and 18 deletions

View File

@@ -29,7 +29,7 @@ void skynet_socket_updatetime();
int skynet_socket_sendbuffer(struct skynet_context *ctx, struct socket_sendbuffer *buffer);
int skynet_socket_sendbuffer_lowpriority(struct skynet_context *ctx, struct socket_sendbuffer *buffer);
int skynet_socket_listen(struct skynet_context *ctx, const char *host, int port, int backlog);
int skynet_socket_listen(struct skynet_context *ctx, const char *host, int *port, int backlog);
int skynet_socket_connect(struct skynet_context *ctx, const char *host, int port);
int skynet_socket_bind(struct skynet_context *ctx, int fd);
void skynet_socket_close(struct skynet_context *ctx, int id);