Improved type system
This commit is contained in:
parent
3550f9e24e
commit
b8e37fafae
62 changed files with 189 additions and 172 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue