Skip to content

Commit

Permalink
Add closeRead() AKA shutdown(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 4, 2018
1 parent 6d7803b commit 85099af
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions js/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ class ConnImpl implements Conn {
close(): void {
close(this.fd);
}


/** closeRead shuts down (shutdown(2)) the reading side of the TCP connection.
* Most callers should just use close().
*/
closeRead(): void {
// TODO(ry) Connect to AsyncWrite::shutdown in resources.rs
return notImplemented();
}

/** closeWrite shuts down (shutdown(2)) the writing side of the TCP connection.
* Most callers should just use close().
*/
closeWrite(): void {
// TODO(ry) Connect to AsyncWrite::shutdown in resources.rs
return notImplemented();
}

}

/** Listen announces on the local network address.
Expand Down

0 comments on commit 85099af

Please sign in to comment.