how to send a file in client/server using socket?

shohoku

Active member
Joined
Jun 15, 2005
Messages
31
Programming Experience
Beginner
in the chatting app
userA want to send a file to userB
can anyone tell me how to do it in VB.NET by using socket??
thanks~~~
 
You should have a look at this tutorial (Creating your own Chat Messenger). It explains the project with detailed infomation and it has exact commands that I have added.

This is the all TCP string and File Transfer client server sample code. Enjoy!
 

Attachments

  • File Transfer (update).zip
    50.5 KB · Views: 837
Master Zero, I think there is a bug in this program. It seems to be a buffer issue. If you transfer a small text file (my tests were with one of 10k) then then end of the file is full of white space. when debugging the code it seems that if the file size is smaller than the buffer size then it writes white space to the file until it is the same size as the buffer.

I hope you are still reading this thread!
 
Thanks for the Bug report, I will investigate the problem and try to fix it. I’ll post the solution.
 
a bit too late

hi! i know this post was in 2 years back. but I found it related to my final yeear project. can it still be in use?
 
Help

Hi Master Zero, are you still active on this page? please we need you help regarding .net socket communication..can you respond if this post gets to well please.

cheers,
mbgreat
 
Back
Top