The TDVCmdProtocol is a simple
text-format where commands and values are separated with the
‘;’-character. A command is defined as a string and a value is defined
by a tag and a value separated with an ‘=’ character.
A typical message consists of a command and a couple of values:
example: watch;program=scorpion;value=on
Using a text protocol where values are identified with tags and commands
are commands means that application protocols can be defined and
extended without having the receiving parser to fail even if command or
values are unknown when received.
The IMTDVCmdProtocol uses transport layer defined by Internet Messenger
to securely transmit the messages over TCP/IP. This protocol is simple
and text-based to make it easy to implement.
The Internet Messenger 4 Network Protocol is pure text with the
following properties:
- No restriction on message
size<
- A message has the
following format:
- Header – format is <ip>:<port>:
- zero-terminated ASCII
string
- Each message is
acknowledge by sending a lf-character to the client in the open
socket
Procedure to send a message to
an Internet Messenger server is:
- Open a socket
- Format Header with
requester 192.168.0.10:80:
- Concatenate the header and the
zero-terminated message string: “192.168.0.10:80: watch;program=scorpion;value=on<null>”
- Send the package over the
open socket
- Wait for an acknowledge
- Close the socket.
The ip –format is
192.168.0.10
Ascii Table
|