richrock316
Programmer
I am writing an app that takes a binary file and breaks it into "messages" (frtom a different app i wrote). These messages have a time stamp on them, the times between each message vary (could be 1/10 sec, 1/2 sec, etc.). I then make a connection across the network to another app that is listening. I send the first message, wait until the time between the 1st and 2nd message has passed (1/10 sec, etc.) and then send second message. This keeps going on until all messages are sent (appx 1/2 hour).
The server app (which somebody else is doing) receives the messages does some calculations and then sends them back as soon as the calculation is done. My side then receives the redone messages and stores them into a new file.
One of the requirements is that i only use 1 port for both sending and receiving.
The way i see it, it goes something like this.
1.pre-setup all messages
2.set port to send
3.send 1st message
4.set port to listen
5.if recalculated message received then store it, otherwise keep listening until right before time gap of 2nd message.
6.switch port back to send
7.send next message
8.repeat 4-7 until end of file
After all that rambling, what i really want to know is are there any pitfalls i should be aware of. Or are there any suggestions anybody could offer. Its the flipping back and forth on the same port that worries me.
This is the first time ive tried to tackle a client-server app, so i hope i was clear.
Thanks everybody
Richard
The server app (which somebody else is doing) receives the messages does some calculations and then sends them back as soon as the calculation is done. My side then receives the redone messages and stores them into a new file.
One of the requirements is that i only use 1 port for both sending and receiving.
The way i see it, it goes something like this.
1.pre-setup all messages
2.set port to send
3.send 1st message
4.set port to listen
5.if recalculated message received then store it, otherwise keep listening until right before time gap of 2nd message.
6.switch port back to send
7.send next message
8.repeat 4-7 until end of file
After all that rambling, what i really want to know is are there any pitfalls i should be aware of. Or are there any suggestions anybody could offer. Its the flipping back and forth on the same port that worries me.
This is the first time ive tried to tackle a client-server app, so i hope i was clear.
Thanks everybody
Richard