stream: add a stream service class abstracting services using BSD sockets