Move more socket options into the flow framework.

This commit is contained in:
Ian Gulliver
2016-03-02 21:51:30 -08:00
parent 91775999d8
commit 10ba451458
8 changed files with 18 additions and 9 deletions

View File

@@ -48,13 +48,13 @@ void socket_ready_send(int fd) {
assert(res == 0);
}
void socket_send(int fd) {
void socket_connected_send(int fd) {
// Called by data flow code; NOT safe to assume that fd is a socket
int res = shutdown(fd, SHUT_RD);
assert(res == 0 || (res == -1 && errno == ENOTSOCK));
}
void socket_receive(int fd) {
void socket_connected_receive(int fd) {
// Called by data flow code; NOT safe to assume that fd is a socket
int res = shutdown(fd, SHUT_WR);
assert(res == 0 || (res == -1 && errno == ENOTSOCK));