diff --git a/socket.vp b/socket.vp index 77487dc..09779f1 100644 --- a/socket.vp +++ b/socket.vp @@ -337,11 +337,11 @@ class Socket: client_fd: INT = INT(accept(self.fd, &addr, &addrlen)) if client_fd == SOCKET_ERROR: return SOCKET_ERROR - out_client.fd = client_fd + out_client.fd = INT(client_fd) out_client.family = self.family out_client.type = self.type out_client.protocol = self.protocol - return client_fd + return INT(client_fd) def settimeout(self, timeout_ms: INT) -> INT: """Set timeout for receive and send operations (milliseconds). @@ -408,7 +408,7 @@ def SocketCreate(family: INT, type: INT, protocol: INT, out_sock: Socket*) -> IN if fd == win32.winsock2.INVALID_SOCKET: return -1 else: fd: INT = INT(socket(family, type, protocol)) - out_sock.fd = fd + out_sock.fd = INT(fd) if fd == INVALID_SOCKET: return -1 return 0