upd3
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
module netio
|
module netio
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Well defined address families. Must work on all platforms.
|
Common address families. Should work on most platforms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pub const af_unspec = AddrFamily(C.AF_UNSPEC)
|
pub const af_unspec = AddrFamily(C.AF_UNSPEC)
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
module netio
|
module netio
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Well defined socket types.
|
Common socket types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pub const sock_stream = SocketType(C.SOCK_STREAM)
|
pub const sock_stream = SocketType(C.SOCK_STREAM)
|
||||||
|
|||||||
+2
-2
@@ -35,8 +35,8 @@ pub fn Socket.new(domain AddrFamily, typ SocketType, protocol Protocol) !Socket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// typeof reports the actual socket type.
|
// type_of reports the actual socket type.
|
||||||
pub fn (s Socket) typeof() !SocketType {
|
pub fn (s Socket) type_of() !SocketType {
|
||||||
return s.get_option_int(C.SOL_SOCKET, C.SO_TYPE)!
|
return s.get_option_int(C.SOL_SOCKET, C.SO_TYPE)!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
module netio
|
module netio
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Well defined socket levels.
|
Common socket levels.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pub const sol_socket = C.SOL_SOCKET
|
pub const sol_socket = C.SOL_SOCKET
|
||||||
|
|||||||
Reference in New Issue
Block a user