decode data sent to tcp listener