mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 07:34:36 +00:00
Added rid to Conn interface (#1513)
This commit is contained in:
parent
b1c59d7231
commit
fda604ff05
2 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,8 @@ export interface Conn extends Reader, Writer, Closer {
|
||||||
localAddr: string;
|
localAddr: string;
|
||||||
/** The remote address of the connection. */
|
/** The remote address of the connection. */
|
||||||
remoteAddr: string;
|
remoteAddr: string;
|
||||||
|
/** The resource ID of the connection. */
|
||||||
|
rid: number;
|
||||||
/** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most
|
/** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most
|
||||||
* callers should just use `close()`.
|
* callers should just use `close()`.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,6 +22,7 @@ testPerm({ net: true }, async function netDialListen() {
|
||||||
assertEqual(1, buf[0]);
|
assertEqual(1, buf[0]);
|
||||||
assertEqual(2, buf[1]);
|
assertEqual(2, buf[1]);
|
||||||
assertEqual(3, buf[2]);
|
assertEqual(3, buf[2]);
|
||||||
|
assert(conn.rid > 0);
|
||||||
|
|
||||||
// TODO Currently ReadResult does not properly transmit EOF in the same call.
|
// 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
|
// it requires a second call to get the EOF. Either ReadResult to be an
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue