| ... | @@ -12,7 +12,7 @@ const Socket = @This(); | ... | @@ -12,7 +12,7 @@ const Socket = @This(); |
| 12 | /// A socket-address pair. | 12 | /// A socket-address pair. |
| 13 | pub const Connection = struct { | 13 | pub const Connection = struct { |
| 14 | socket: Socket, | 14 | socket: Socket, |
| 15 | address: net.Address, | 15 | address: net.Address, |
| 16 | }; | 16 | }; |
| 17 | | 17 | |
| 18 | /// The underlying handle of a socket. | 18 | /// The underlying handle of a socket. |
| ... | @@ -231,7 +231,7 @@ test { | ... | @@ -231,7 +231,7 @@ test { |
| 231 | } | 231 | } |
| 232 | | 232 | |
| 233 | test "socket/linux: set read timeout of 1 millisecond on blocking socket" { | 233 | test "socket/linux: set read timeout of 1 millisecond on blocking socket" { |
| 234 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 234 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 235 | | 235 | |
| 236 | const a = try Socket.init(os.AF_INET, os.SOCK_STREAM | os.SOCK_CLOEXEC, os.IPPROTO_TCP); | 236 | const a = try Socket.init(os.AF_INET, os.SOCK_STREAM | os.SOCK_CLOEXEC, os.IPPROTO_TCP); |
| 237 | defer a.deinit(); | 237 | defer a.deinit(); |
| ... | @@ -273,4 +273,4 @@ test "socket/linux: create non-blocking socket pair" { | ... | @@ -273,4 +273,4 @@ test "socket/linux: create non-blocking socket pair" { |
| 273 | | 273 | |
| 274 | const ab = try a.accept(os.SOCK_NONBLOCK | os.SOCK_CLOEXEC); | 274 | const ab = try a.accept(os.SOCK_NONBLOCK | os.SOCK_CLOEXEC); |
| 275 | defer ab.socket.deinit(); | 275 | defer ab.socket.deinit(); |
| 276 | } | | |
| \ No newline at end of file |
| | 276 | } |