From 9b242ed23263e430110102ed82fa7fb9355eafbf Mon Sep 17 00:00:00 2001
From: Dave Bakker
[`udp::address-family`](udp)
SO_PROTOCOL_INFO on Windows. |
| SO_TYPE | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | * indirectly through the type of the socket resource. |
| SO_PROTOCOL | ✅* | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | * indirectly through the type of the socket resource. SO_PROTOCOL_INFO on Windows. |
-| SO_ACCEPTCONN | ❔ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
+| SO_ACCEPTCONN | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | [`tcp::is-listening`](tcp) |
| IPV6_V6ONLY | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | [`tcp::(set-)ipv6-only`](tcp)
[`udp::(set-)ipv6-only`](udp) |
| IP_HDRINCL | ⛔ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | Out of scope. Raw sockets only. |
| IPV6_HDRINCL | ⛔ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | Out of scope. Raw sockets only. |
diff --git a/example-world.md b/example-world.md
index 8c74520..cb39897 100644
--- a/example-world.md
+++ b/example-world.md
@@ -1228,6 +1228,17 @@ a pair of streams that can be used to read & write to the connection.
ip-socket-address
, error-code
>is-listening: func
Whether the socket is listening for new connections.
+Equivalent to the SO_ACCEPTCONN socket option.
+this
: tcp-socket
address-family: func
Whether this is a IPv4 or IPv6 socket.
Equivalent to the SO_DOMAIN socket option.
diff --git a/wit/tcp.wit b/wit/tcp.wit index 4edb1db..0e3f27e 100644 --- a/wit/tcp.wit +++ b/wit/tcp.wit @@ -154,6 +154,11 @@ interface tcp { /// -