debugging socket stream