2025-02-08 17:34:11 +01:00
|
|
|
struct sockaddr_in_bsd {
|
2025-02-17 14:31:47 +01:00
|
|
|
sin_len int8
|
|
|
|
sin_family int8
|
|
|
|
sin_port int16
|
|
|
|
sin_addr int64
|
|
|
|
sin_zero int64
|
2025-02-08 17:34:11 +01:00
|
|
|
}
|
|
|
|
|
2025-02-17 14:31:47 +01:00
|
|
|
socket(family int, type int, protocol int) -> int {
|
2025-02-06 13:19:04 +01:00
|
|
|
return syscall(0x2000061, family, type, protocol)
|
|
|
|
}
|
|
|
|
|
2025-02-17 14:31:47 +01:00
|
|
|
accept(fd int, address *any, length int) -> int {
|
2025-02-06 13:19:04 +01:00
|
|
|
return syscall(0x200001E, fd, address, length)
|
|
|
|
}
|
|
|
|
|
2025-02-17 14:31:47 +01:00
|
|
|
bind(fd int, address *sockaddr_in_bsd, length int) -> int {
|
2025-02-06 13:19:04 +01:00
|
|
|
return syscall(0x2000068, fd, address, length)
|
|
|
|
}
|
|
|
|
|
2025-02-17 14:31:47 +01:00
|
|
|
listen(fd int, backlog int) -> int {
|
2025-02-06 13:19:04 +01:00
|
|
|
return syscall(0x200006A, fd, backlog)
|
|
|
|
}
|