REORG: stream_interface: create a struct sock_ops to hold socket operations
These operators are used regardless of the socket protocol family. Move
them to a "sock_ops" struct. ->read and ->write have been moved there too
as they have no reason to remain at the protocol level.
diff --git a/src/peers.c b/src/peers.c
index ab6f7ed..8c8795a 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1023,15 +1023,15 @@
si->applet.st0 = PEER_SESSION_END;
/* fall through */
case PEER_SESSION_END: {
- si->shutw(si);
- si->shutr(si);
+ si->sock.shutw(si);
+ si->sock.shutr(si);
si->ib->flags |= BF_READ_NULL;
goto quit;
}
}
}
out:
- si->update(si);
+ si->sock.update(si);
si->ob->flags |= BF_READ_DONTWAIT;
/* we don't want to expire timeouts while we're processing requests */
si->ib->rex = TICK_ETERNITY;