Results 1 to 11 of 11

Thread: [RESOLVED] Connect to another app across a network?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Resolved [RESOLVED] Connect to another app across a network?

    Hi,
    another question, which the application i am developing, i need to be able to run an application from anywhere on the network and be able to connect to another application to refresh the web browser on that application. is this possible, i have heard of winsock before but i havent used it and not sure if it is the right thing to use.



    many thanks
    Richard <><

  2. #2
    Lively Member
    Join Date
    Jul 2004
    Posts
    102

    Re: Connect to another app across a network?

    If your looking for connectivity through your app you best using Sockets rather than Winsock in .Net. If you download the 101 Samples from main vb.net forum they helped me tons. Ive you cant find the link ill post it here. In the sample app it shows a chatroom (client and Server apps) which pass commands in strings to each other. Should be right up your street for what you need.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connect to another app across a network?

    Winsock is pre-.NET. Sockets is generally what you'd use. Check out the VB.NET 101 samples (see my sig) for a networking/sockets example that uses a client/server chat program.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connect to another app across a network?

    Quote Originally Posted by Dilvid
    If your looking for connectivity through your app you best using Sockets rather than Winsock in .Net. If you download the 101 Samples from main vb.net forum they helped me tons. Ive you cant find the link ill post it here. In the sample app it shows a chatroom (client and Server apps) which pass commands in strings to each other. Should be right up your street for what you need.
    What a fine idea!
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Re: Connect to another app across a network?

    thanks, though i cant seem to find the sample on the site, i cliked ur link in ur sig
    Richard <><

  6. #6
    Lively Member
    Join Date
    Jul 2004
    Posts
    102

    Re: Connect to another app across a network?

    its not a sample on a site, you download the package wnd then it installs a lot of examples to my documents/MSDN

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Re: Connect to another app across a network?

    cool, i have downloaded it, but i cannot seem to get it to work, i run the server and then the client and try to send a message tot he client, but nothing happens
    Richard <><

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Re: Connect to another app across a network?

    as its using sockets shoudlnt there be a place to put the ip address of the server, so that the client can connect properly, i cant figue out why it isnt working and the ip address is the only idea we could come up with. anyone know how the example operates?
    Richard <><

  9. #9
    Lively Member
    Join Date
    Jul 2004
    Posts
    102

    Re: Connect to another app across a network?

    if the server and client are running on the same computer the IP will be 127.0.0.1

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Re: Connect to another app across a network?

    yeh, i have found where to put the ip in the client, but i put in the ip and when i run the apps nothing happens, the client does know when the server is not running, but when they are both running the server text box doesnt update and when i try to send a message between server - client and vice versa it just doesnt work.
    Richard <><

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    364

    Re: Connect to another app across a network?

    i didnt use the microsoft sample in the end as i couldnt get it to work, so i found a tutorial and now have a basic working client server.

    thanks
    Richard <><

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