SocketStream :: various functions