Apologies if my terminology is not correct with this question, but bear with me. I know what I want to achieve, just not sure what the proper names are for the classes/functions etc.
I need to make a client/server application using tcplistener and tcpclient which will allow me to send both strings and files... I think.
So in layman's terms, I want to make a server application that will listen for connections from a client on a specific port. The clients will essentially connect to the server and say "hey, I'm client 172.16.10.12. I'm going to send you a file called test.txt, which is 2330k in size. The file's MD5 hash is xxxxxxxxxxx".
Once that communication has taken place, I want the client to then send the file 'test.txt' to the server; the server saving the file to an appropriate location before then generating the file's MD5 hash and comparing it to the MD5 and file size the client proposed, before finally reporting back to the client 'Ok' or 'Success'.
If the file size or MD5 differ, it will be 'Fail'.
I'm not asking for anyone to do this for me, but for someone to nudge me in the right direction. All of the tutorials/examples I seem to find on here or youtube etc seem to focus on either files or strings. I cant seem to find one which would cater for both, which is what I think i may need, although I may be wrong.
I hope that all makes sense! Huge thanks in advance for any help on this. This is the first time i've played with TCP functions, having always used FTP before because of perceived ease.