The task is to write a TCP client that establishes a connection with a TCP server (both written in C) which accepts the connection. The client is to send the contents of a file that it has opened for reading to the server. The server then reconstructs the file when it receives the client data. My program uses the socket bind listen accept functions to communicate with the client, but the problem is the reception of the data from the client. How can I make the server continuously receive and write to the file (can I use fork() here?) and the client continuously read from the file and send to the server? I tried using a while loop in the server but got the weirdest error, too big to post here. However, I think the while loop in the client that enables the coninous reading and sending works.
2007-11-12
13:31:13
·
4 answers
·
asked by
discombobulated girl
4
in
Computers & Internet
➔ Programming & Design