Hello to all, this is my first thread on this site. I am a newbie and i am studying c++ using Qt. I am asked to create a sort of chat client/server where two users can (of course) talk each other and also send a file. For the talking itself is not a problem, i've already done it. I am wondering how to send a file at the same time. I mean, i should use two different sockets, one for the chat and one for the file transfer or it can be done on the same socket? If can be done on the same socket, how can the client or server understands if it's a file or simply a text message?. I hope i was not too confusing. Thank you for your help