Results 1 to 4 of 4

Thread: Direct Connection

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Direct Connection

    What would be the best way of sending data directly to someone through their ip address? No servers involved.

    As in, you type their ip address into this program, (a port?), and your message, and if they are running this program, they receive said message in the application.

    Should I send packets, use some .NET state of the art class that I am unaware of that sends messages and such, or some other approach?

    I'm looking for a direct way to send data from one computer to another, be it text, an image in the form of an array of bytes, or whatever.

    Thanks.

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    Re: Direct Connection

    Windows Communication Foundation is the VB 2008 library designed to do this. Google it and you'll find a ton of examples on how to implement it.
    (VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Direct Connection

    You can also look at System.Net.Sockets as well as TcpClient.

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Direct Connection

    The application of yours would need to use a TcpListener to listen on a specific port for incoming connection, and a TcpClient to connect to other hosts.
    Or you could use the corresponding UDP classes. But I dont think that would be needed.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width