Hmm, you mean file-uploading, or just command-sending? Well, this is uploading:
-User clicks a button, which starts off the upload.
-Message size is sent to server, which is sizeof(ICV_OP_TOSERVER)
+ sizeof(fileSize) + etc.
-ICV_OP_TOSERVER command sent to server, with the packet's
size, the filesize, filename, etc.
-File transfer dialog pops up
-Buffer of 4096 bytes is allocated
-In the file-send loop ("while(!file.eof && !cancel)"), continually:
-If the server disconnected, quit.
-Process window messages including the "cancel" button
-Set the 1st byte of the buffer to ICV_S_CONTINUESEND
-Read a 4095-byte (or else however much of the file there
is left to read) chunk of the file into the buffer at an offset
-Send n bytes of the buffer to the server, where n is the
number of bytes read from the file, +1 for the status byte
-Update the "transfer rate", progress bar, "bytes uploaded",
etc. in the dialog
-After the file data has all been sent, wait for a 1-byte recv() - it
should be ICV_SR_OK, which it was the last time I bothered
logging it to a file.
-Send the header and command of ICV_OP_GETDIRLIST, etc.