Using Eventmachine I have been able to build a simple client/server program that successfully sends data over a socket. But the server expects that data is a specific format.
In order to communicate with the server, the first step is to send a WAKEUP call and get acknowledgment. The server expects a 3 byte ID in the wakeup call. An example is provided in the documentation that shows the success scenario of sending the ID and receiving the ack.
The client should send the data is the following format:
<sy><sy><eq>111<et>
Within <> brackets is a non-printable ASCII character ( <sy>
= ASCII 22 or Hex 0x16)
Here is some detail of the characters:
<sy>
= ASCII: 22, Hex: 0x16 , Character: ^V
<eq>
= ASCII: 5, Hex: 0x05 , Character: ^E
<et>
= ASCII: 4, Hex: 0x04 , Character: ^D
I'm using a gem Bindata to represent the <sy><sy><eq>111<et>
but don't know exactly which type to use. Can you provide a way to acheive this?