I have a simple file sharing application. Users are sending data among each other via packets of size 1024 KB. Everything works perfectly, but what I need next is header for each packet. I'm not completely sure that I understand the concept of a header, but I believe it should contain information such as: username of the user that has the file, size of the file, name of the file so that the user that is downloading the file can be sure he is downloading the right file.
Any example or link would be most welcome as this is the first time I'm dealing with this type of thing.