ETX and STX characters in PHP
Hi,
This is a PHP question,maybe someone in here can help me on this one.
I have a socket server and client running.From my server i send command string to the client which then process these commands.My problem comes when i have send multiple commands to the client which then read them as one command.(One socket_read for multiple socket_sends)
I want to attach STX and ETX characters(ASCII 2 and 3) to each command so that my client that parse the data knows where each commands starts and ends.
My problem is,how do i use these chars.If i wand to send(socket_write) it do i put the characters S,T, and X in the string or is there some predefined char that i can use for STX and ETX?Also,if i socket_read how will it come out on the other side?
Thanks for any help or suggestions
|