<s> from pants import Engine , Server , Stream <EOL> class BlockEcho ( Stream ) : <EOL> def on_connect ( self ) : <EOL> self . read_delimiter = <NUM_LIT:8> <EOL> def on_read ( self , block ) : <EOL> self . write ( block + '<STR_LIT:\r\n>' ) <EOL> server = Server ( ConnectionClass = BlockEcho ) <EOL> server . listen ( <NUM_LIT> ) <EOL> Engine . instance ( ) . start ( ) </s>
