Fixed server example for Mac

This commit is contained in:
Eduard Urbach 2025-03-01 12:48:34 +01:00
parent 6698cd95ad
commit 32d81ce98d
Signed by: eduard
GPG key ID: 49226B848C78F6C8

View file

@ -1,6 +1,6 @@
import sys import sys
bind(socket int, port int) -> int { bind(socket int, port uint16) -> int {
addr := new(sys.sockaddr_in_bsd) addr := new(sys.sockaddr_in_bsd)
addr.sin_family = 2 addr.sin_family = 2
addr.sin_port = htons(port) addr.sin_port = htons(port)