I have Erlang SSL TCP socket which has a permanent TCP connection to other party, we use a protocol similar to ISO8583 protocol four first byte is a packet size which is ASC