23 lines
512 B
Plaintext
23 lines
512 B
Plaintext
struct sockaddr_in_bsd {
|
|
sin_len int8
|
|
sin_family int8
|
|
sin_port int16
|
|
sin_addr int64
|
|
sin_zero int64
|
|
}
|
|
|
|
socket(family int, type int, protocol int) -> int {
|
|
return syscall(0x2000061, family, type, protocol)
|
|
}
|
|
|
|
accept(fd int, address *any, length int) -> int {
|
|
return syscall(0x200001E, fd, address, length)
|
|
}
|
|
|
|
bind(fd int, address *sockaddr_in_bsd, length int) -> int {
|
|
return syscall(0x2000068, fd, address, length)
|
|
}
|
|
|
|
listen(fd int, backlog int) -> int {
|
|
return syscall(0x200006A, fd, backlog)
|
|
} |