Skip to content

Commit

Permalink
Added rid to Conn interface (denoland#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyplants authored and ry committed Jan 14, 2019
1 parent b1c59d7 commit fda604f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
*/
Expand Down
1 change: 1 addition & 0 deletions js/net_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fda604f

Please sign in to comment.