I am working on Connecting an Embedded Circuit board to PC via TCP.
The board contains a chip which, sadly, doesn't generate any interrupt on Receiving data. But it does generates an interrupt on receiving "Keep-Alive" signal.
Currently I have to poll for data. Instead, I am thinking that, I will send data from PC and then a KeepAlive Signal. Whenever a KeepAlive is received, I will read data too. I do understand that this might generate false alarms but it's better than continuous polling.
I observed a Keep-Alive packet on Wireshark, it has One byte of Data and it is "00".
And then I tried to send TCP Packet with Data as "00":
I can see, Only Flag
Section is different.
I got Two questions:
- (Broadly) How to manually send a Keep-Alive Signal?
- How to change that flag setting? (Flags in send and sendto are different)
Update: I have tried RawSockets, but that didn't help me or I missed something. I just change Flag to ACK in RAW Sockets header.