stream: improve io streaming
socket: improve main type
datagram: add main type