| ... | @@ -247,7 +247,10 @@ pub fn io(t: *Threaded) Io { | ... | @@ -247,7 +247,10 @@ pub fn io(t: *Threaded) Io { |
| 247 | .windows => netListenIpWindows, | 247 | .windows => netListenIpWindows, |
| 248 | else => netListenIpPosix, | 248 | else => netListenIpPosix, |
| 249 | }, | 249 | }, |
| 250 | .netListenUnix = netListenUnix, | 250 | .netListenUnix = switch (builtin.os.tag) { |
| | 251 | .windows => netListenUnixWindows, |
| | 252 | else => netListenUnixPosix, |
| | 253 | }, |
| 251 | .netAccept = switch (builtin.os.tag) { | 254 | .netAccept = switch (builtin.os.tag) { |
| 252 | .windows => netAcceptWindows, | 255 | .windows => netAcceptWindows, |
| 253 | else => netAcceptPosix, | 256 | else => netAcceptPosix, |
| ... | @@ -2873,7 +2876,7 @@ fn netListenIpWindows( | ... | @@ -2873,7 +2876,7 @@ fn netListenIpWindows( |
| 2873 | }; | 2876 | }; |
| 2874 | } | 2877 | } |
| 2875 | | 2878 | |
| 2876 | fn netListenUnix( | 2879 | fn netListenUnixPosix( |
| 2877 | userdata: ?*anyopaque, | 2880 | userdata: ?*anyopaque, |
| 2878 | address: *const net.UnixAddress, | 2881 | address: *const net.UnixAddress, |
| 2879 | options: net.UnixAddress.ListenOptions, | 2882 | options: net.UnixAddress.ListenOptions, |
| ... | @@ -2906,6 +2909,19 @@ fn netListenUnix( | ... | @@ -2906,6 +2909,19 @@ fn netListenUnix( |
| 2906 | return socket_fd; | 2909 | return socket_fd; |
| 2907 | } | 2910 | } |
| 2908 | | 2911 | |
| | 2912 | fn netListenUnixWindows( |
| | 2913 | userdata: ?*anyopaque, |
| | 2914 | address: *const net.UnixAddress, |
| | 2915 | options: net.UnixAddress.ListenOptions, |
| | 2916 | ) net.UnixAddress.ListenError!net.Socket.Handle { |
| | 2917 | if (!net.has_unix_sockets) return error.AddressFamilyUnsupported; |
| | 2918 | const t: *Threaded = @ptrCast(@alignCast(userdata)); |
| | 2919 | _ = t; |
| | 2920 | _ = address; |
| | 2921 | _ = options; |
| | 2922 | @panic("TODO"); |
| | 2923 | } |
| | 2924 | |
| 2909 | fn posixBindUnix(t: *Threaded, fd: posix.socket_t, addr: *const posix.sockaddr, addr_len: posix.socklen_t) !void { | 2925 | fn posixBindUnix(t: *Threaded, fd: posix.socket_t, addr: *const posix.sockaddr, addr_len: posix.socklen_t) !void { |
| 2910 | while (true) { | 2926 | while (true) { |
| 2911 | try t.checkCancel(); | 2927 | try t.checkCancel(); |