I need to write a TCP consol application that does the following:
-Authenticates with TCP server
-Gets authentication message
-Sends a report
-waits for response.... if it succeeded
---Sends mulitple supplementary data streams
-etc.
Everything I've read with TCp/IP is that I'll need to have a method running in a background thread waiting for this response... however seeing that after I send it, I know i'll be getting one... could I not dO:
-Send message
-while(.... true for 30 seconds...)
{
//wait for response.
}
if reponse = good
send supplementary
while(...wait for 30 seconds...)
{
}
etc.
Would that work? Or is there a potential hazard there?
killer ninja coding monkeys really exist!