This commit is contained in:
ge
2026-04-04 00:55:50 +03:00
parent 1cf6d878b5
commit 5b56659d21
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
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)
+1 -1
View File
@@ -1,7 +1,7 @@
module netio
/*
Well defined socket types.
Common socket types.
*/
pub const sock_stream = SocketType(C.SOCK_STREAM)
+2 -2
View File
@@ -35,8 +35,8 @@ pub fn Socket.new(domain AddrFamily, typ SocketType, protocol Protocol) !Socket
}
}
// typeof reports the actual socket type.
pub fn (s Socket) typeof() !SocketType {
// type_of reports the actual socket type.
pub fn (s Socket) type_of() !SocketType {
return s.get_option_int(C.SOL_SOCKET, C.SO_TYPE)!
}
+1 -1
View File
@@ -1,7 +1,7 @@
module netio
/*
Well defined socket levels.
Common socket levels.
*/
pub const sol_socket = C.SOL_SOCKET