One more thing JOS!
Could you explain "You have to define some form of protocol to which both
your client and server 'obey' because your connection is just a stream of bytes.
You define the meaning of those bytes."????
How should I define a Protocol?
Debasis Jana
If a client wants to use a service it has to know the ip number of the host that
runs the service *and* its port number. The client can connect to the server
running the service then,
The only means of communication between a server and a client are the two
streams: one for writing and one for reading. If you want to save a file somewhere
on the server's filing system you have to tell the server where you want to store
the file (i.e. you have to give the full path name of the new file on the server) and
you have to send the content you want to have in that file and preferably the size
of the content so the server knows what it can stop saving data and close the
file again. The way you do that (i.e. communicate what and how with the server)
is called the 'protocol'.
You either have to implement an already existing protocol or, when both the
server and the client(s) are made by you, you have to define your own protocol
for that, i.e. the file name, the content and its size have to be send to the server
somehow.
kind regards,
Jos