TCP connection handler provides a byte stream interface. Implementation keeps an internal buffer for each TCP connection handler, which can be fetched by or inspected by . Size of such buffer can be inspected by method.
- data in a TCP connection handler can be consumed by portions.
UDP connection handler provides a datagram interface.
- data in a UDP connection handler can NOT be consumed by portions. Actually it’s possible to specify amounts of bytes to consume from a UDP connection handler, such amount will be provided to a caller (if any), but a whole UDP datagram is fetched from an underlying UDP socket, so it won’t be possible to consume another part of THIS datagram in a next request as it will be fetched already.
- In a current implementation all handler i/o events are paused till data is consumed from the handler, of course if there’s some data to consume. For example, if a handler has some data to consume and this data is not consumed either by or requests, no future i/o events for this handler get delivered to subscribers till data from this handler gets consumed.