Improved type system
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
htons(num Int) -> Int {
|
||||
htons(num int) -> int {
|
||||
return ((num & 0xFF) << 8) | (num >> 8)
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
bind(socket Int, port Int) -> Int {
|
||||
bind(socket int, port int) -> int {
|
||||
addr := new(sys.sockaddr_in)
|
||||
addr.sin_family = 2
|
||||
addr.sin_port = htons(port)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
bind(socket Int, port Int) -> Int {
|
||||
bind(socket int, port int) -> int {
|
||||
addr := new(sys.sockaddr_in_bsd)
|
||||
addr.sin_family = 2
|
||||
addr.sin_port = htons(port)
|
||||
|
Reference in New Issue
Block a user