Hi We are writing a unique project. I was wondering if someone could point me us in the right direction, as I am not familiar with tcp programming.
We talk to an external system. I send a tcp packet and receive the tcp response. This needs to work from a page in a web application, continuously polling every x msecs
The proposed message length is 8 bytes, no information about the start or end of message is transmitted. Message structure: | byte 0 | byte 1 | byte 2 | byte 3 | byte 4 | byte 5 | byte 6 | byte 7 |
Message delimiters are: | byte 0 | = 0x02 (stx) and | byte 7 | = 0x03 (etx)
My send message: | stx | ‘s’ | ‘b’ | ‘0’ | ‘0’ | ‘0’ |‘0’ |etx |
My recv message: | stx | ‘S’ | ‘B’ | ‘0’ | '1' | ‘0’ | ‘0’ | etx |
Questions:
Should I use the tcpCLient/Listener classes or Sockets classes?
Whats the best way to get the web page to continuously poll and send/receive these packets every x ms?