Sending files p2p

  • Thread starter Thread starter Piedro
  • Start date Start date
P

Piedro

Hi,

has anyone in here got a good example or some hints on how to send a
file directly from one pc to another pc using vb.net, for example I've
got my pc's ip and a friends pc's ip and I want to send him a file or
he wants to send me a file, it just needs to be a very basic program
for sending files up to maximum 6mb.
thnx a lot
Peter
 
Piedro said:
has anyone in here got a good example or some hints on how to send
a file directly from one pc to another pc using vb.net, for example
I've got my pc's ip and a friends pc's ip and I want to send him a
file or he wants to send me a file, it just needs to be a very basic
program for sending files up to maximum 6mb.

You need a file exchange program. If you don't use the windows network you
can either try to find a ready-to-use component that allows sending and
receiving files, or define your own transmission protocol in your own
application, based upon TCP/IP. Have a look at the
System.Net.Sockets.TcpClient and System.Net.Sockets.TcpListener classes.
BTW and AFAIK, WinXP Prof. contains an FTP server.

see also:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaccessinginternet.asp
especially
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconusingtcpservices.asp
and the other topics around.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Armin Zingler said:
Piedro said:
has anyone in here got a good example or some hints on how to
send a file directly from one pc to another pc using vb.net, for
example I've got my pc's ip and a friends pc's ip and I want to
send him a file or he wants to send me a file, it just needs to be
a very basic program for sending files up to maximum 6mb.

You need a file exchange program. [...]

I know I could have left out this sentence... :)
 
Armin Zingler said:
Armin Zingler said:
Piedro said:
has anyone in here got a good example or some hints on how to
send a file directly from one pc to another pc using vb.net, for
example I've got my pc's ip and a friends pc's ip and I want to
send him a file or he wants to send me a file, it just needs to be
a very basic program for sending files up to maximum 6mb.

You need a file exchange program. [...]

I know I could have left out this sentence... :)

No kiddin lol ;-)
but thnx for the links I'll check them out later tonight because I'm at work now
 
Armin Zingler said:
Armin Zingler said:
Piedro said:
has anyone in here got a good example or some hints on how to
send a file directly from one pc to another pc using vb.net, for
example I've got my pc's ip and a friends pc's ip and I want to
send him a file or he wants to send me a file, it just needs to be
a very basic program for sending files up to maximum 6mb.

You need a file exchange program. [...]

I know I could have left out this sentence... :)

And some more response, I know there exist a lot of file exchange
programs, but I was thinking of programming one my self, just for the
fun of it and another question, would using the hash functions of .net
be a good idea to check if the file has arrived ok or has been send
ok? Any thoughts on this?

BTW if my post arrive late, it's because I'm posting via google
because at my office I can't access the news server via outlook
they're blocked :(
 
Piedro said:
And some more response, I know there exist a lot of file exchange
programs, but I was thinking of programming one my self, just for
the fun of it and another question, would using the hash functions of
.net be a good idea to check if the file has arrived ok or has been
send ok? Any thoughts on this?

Depends on how much you wanna do on your own. If you want to do it all, use
the TCP* classes I mentioned. The simplest way to trigger the complete
transmission, is probably to send the file size before to let the
client/server know when the file is complete. But that's up to you how
define your own protocol. I'm sure there are dozens of samples out there
that already do what you need. Sorry, I don't have a link.
 
Armin Zingler said:
Depends on how much you wanna do on your own. If you want to do it all, use
the TCP* classes I mentioned. The simplest way to trigger the complete
transmission, is probably to send the file size before to let the
client/server know when the file is complete. But that's up to you how
define your own protocol. I'm sure there are dozens of samples out there
that already do what you need. Sorry, I don't have a link.

Thnx for your advice, I'll check in to it when I have some time off,
but thnx again for the tips :)

Toedels
 
Back
Top