I have written an echoclient and echoserver network program so that messages written on the client side can be echoed to the client by the echoserver program. Echoclient is an interactive program that waits for the user to enter a message. It then sends the message, gets the response, and then again waits for a new message from the user. Now I would like to write a script shell so that I can send a new message to the server every 100 microseconds. But I don't know how to pass messages to the echoclient program. Any thought on that?
#connect to the server ...
./echoclient SERVER_IP_ADDR SERVER_PORT
i=1
while [ 1 ]
do
#send "message i" to the server. how to do it?
usleep 100
let i++
done