Sendnetworkfile/receivenetworkfile

Just starting out? Need help? Post your questions and find answers here.
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Sendnetworkfile/receivenetworkfile

Post by Matt »

A client is sending the server a file.
The server needs to know the name of the file before saving it that was sent.
How can I do this?
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

why not just sending the filename with a SendNetworkString() before or after sending the file ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Post by Matt »

Okay, it works I guess. Thanks :)
Anden
Enthusiast
Enthusiast
Posts: 135
Joined: Mon Jul 21, 2003 7:23 am
Contact:

Post by Anden »

Okay, it works I guess
Well, most of the time :-).

But networks are sometimes tricky and in very rare cases it will happen, that one telegram overhauls the other.

In other words, the SendNetworkFile() could be faster than the SendNetworkString().

Thus, to be on the safe side, the sender must wait for an acknowledge of the filename from the receiver. Afterwards the filetransfer can start.

Let's say the SendNetworkFile() command is a little bit incomplete :D
Post Reply