Click here to Skip to main content
15,881,381 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
pls help me how do i send file or receive file using tcp(client-listener)
Posted
Comments
[no name] 1-Nov-14 13:30pm    
sending/receiving files I suggest to use a "upper" Level protocol like ftp
Sergey Alexandrovich Kryukov 1-Nov-14 17:56pm    
Actually, the key here is: application-layer protocol. If some application requires file-based exchange plus something else (requests, commands, anything), it could be a custom protocol, similar to FTP + something else.
Such protocols always exist, and a common mistake is doing such protocols without realizing that they are actually the application-level protocols.
(See my other comment.)
—SA
Sergey Alexandrovich Kryukov 1-Nov-14 17:58pm    
Please see my comment above. The problem is fairly simple, so what makes you feel any difficulties?
One hint: better use separate threads for communication, at least two of them on listening side, one listening for new connection, another one reading/writing data to/from network streams...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900