468,512 Members | 1,346 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

Sending files p2p

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
Nov 20 '05 #1
6 2597
"Piedro" <pp*****@hotmail.com> schrieb

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...nginternet.asp
especially
http://msdn.microsoft.com/library/en...cpservices.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

Nov 20 '05 #2
"Armin Zingler" <az*******@freenet.de> schrieb
"Piedro" <pp*****@hotmail.com> schrieb

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

Nov 20 '05 #3
"Armin Zingler" <az*******@freenet.de> wrote in message news:<40***********************@news.freenet.de>.. .
"Armin Zingler" <az*******@freenet.de> schrieb
"Piedro" <pp*****@hotmail.com> schrieb

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
Nov 20 '05 #4
"Armin Zingler" <az*******@freenet.de> wrote in message news:<40***********************@news.freenet.de>.. .
"Armin Zingler" <az*******@freenet.de> schrieb
"Piedro" <pp*****@hotmail.com> schrieb

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 :(
Nov 20 '05 #5
"Piedro" <pp*****@hotmail.com> schrieb

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

Nov 20 '05 #6
"Armin Zingler" <az*******@freenet.de> wrote in message news:<40***********************@news.freenet.de>.. .
"Piedro" <pp*****@hotmail.com> schrieb

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.


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

Toedels
Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ebrahim | last post: by
reply views Thread by Buddy Ackerman | last post: by
reply views Thread by Buddy Ackerman | last post: by
6 posts views Thread by Anuradha | last post: by
3 posts views Thread by Bonzol | last post: by
3 posts views Thread by יוני גולדברג | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.