diff options
-rw-r--r-- | js/net.ts | 2 | ||||
-rw-r--r-- | js/net_test.ts | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -57,6 +57,8 @@ export interface Conn extends Reader, Writer, Closer { localAddr: string; /** The remote address of the connection. */ remoteAddr: string; + /** The resource ID of the connection. */ + rid: number; /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most * callers should just use `close()`. */ diff --git a/js/net_test.ts b/js/net_test.ts index bf48b3448..4448b4cc1 100644 --- a/js/net_test.ts +++ b/js/net_test.ts @@ -22,6 +22,7 @@ testPerm({ net: true }, async function netDialListen() { assertEqual(1, buf[0]); assertEqual(2, buf[1]); assertEqual(3, buf[2]); + assert(conn.rid > 0); // TODO Currently ReadResult does not properly transmit EOF in the same call. // it requires a second call to get the EOF. Either ReadResult to be an |