I recently started messing with tcp socket programming. I hacked up a little instant messaging application that seems to work has some little problems but the world isn't in need of more IM clients. but I wanted to know a good practice for sending large files over tcp sockets.
i made a simple client server app pair that will let the client send messages to the server. I have the server check the messages for special strings to tell it how to respond, if "#FILE" is sent it knows to write the next stream byte array to disk as a file. and this works great for a 25kb image. but as for a large file. how is this done?
also, how would progress data be sent?
i currently only know how to send the fully byte array in a single chuck, and I can't seem to find any GOOD, documented code examples.
if anyone knows and good links or code examples I would appreciate it. I would like to create a a simple app that runs on the system tray that would let me and my friends easily transfer files of any size back and fourth. there are a BILLION google result titles "C# sending files with TCP." but I looked at hundreds, the were either poorly written with no understandable comments, or they were other people asking my question with no answers.