aboutsummaryrefslogtreecommitdiff
path: root/std/event/tcp.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-08-01 16:26:37 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-08-01 16:26:37 -0400
commite3ae2cfb5243e7255bf4dbcc8a9b7e77a31e9d45 (patch)
tree73dc936ec76d72e8ddeb49e57926716f967d18a2 /std/event/tcp.zig
parent3c8d4e04ea000d087af4e77331340db1c8b1cef3 (diff)
downloadzig-e3ae2cfb5243e7255bf4dbcc8a9b7e77a31e9d45.tar.gz
zig-e3ae2cfb5243e7255bf4dbcc8a9b7e77a31e9d45.zip
add std.event.RwLock and a few more std changes
* add std.event.RwLock and std.event.RwLocked * std.debug.warn does its printing locked * add std.Mutex, however it's currently implemented as a spinlock * rename std.event.Group.cancelAll to std.event.Group.deinit and change the docs and assumptions. * add std.HashMap.clone
Diffstat (limited to 'std/event/tcp.zig')
-rw-r--r--std/event/tcp.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/event/tcp.zig b/std/event/tcp.zig
index 42018b03e5..6757d8cc09 100644
--- a/std/event/tcp.zig
+++ b/std/event/tcp.zig
@@ -61,7 +61,7 @@ pub const Server = struct {
/// Stop listening
pub fn close(self: *Server) void {
- self.loop.removeFd(self.sockfd.?);
+ self.loop.linuxRemoveFd(self.sockfd.?);
std.os.close(self.sockfd.?);
}
@@ -116,7 +116,7 @@ pub async fn connect(loop: *Loop, _address: *const std.net.Address) !std.os.File
errdefer std.os.close(sockfd);
try std.os.posixConnectAsync(sockfd, &address.os_addr);
- try await try async loop.linuxWaitFd(sockfd, posix.EPOLLIN | posix.EPOLLOUT);
+ try await try async loop.linuxWaitFd(sockfd, posix.EPOLLIN | posix.EPOLLOUT | posix.EPOLLET);
try std.os.posixGetSockOptConnectError(sockfd);
return std.os.File.openHandle(sockfd);