MINOR: protocol: add a ->drain() function at the connection control layer

This is what we need to drain pending incoming data from an connection.
The code was taken from conn_sock_drain() without the connection-specific
stuff. It still takes a connection for now for API simplicity.
6 files changed