Results 1 to 3 of 3

Thread: Winsock problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    1

    Winsock problem

    Well I have been working a small project and it requires communicating between programs that are in different computers. So I wanted to test winsock before I started putting it in my program.
    I have downloaded lots of sources that are very basic client server chats and followed tutorials, but still they don't work.
    They work on my own computer, but if I send the client or the server to my friend, it doesn't work.
    So is it even possible to get winsock to work?
    For example I enter a value (x=5000) and my friend who is running the same program on his computer can see that I entered 5000.

    Or is there a more simple way for 2 programs to interact with each other on different computers?

    Thanks a lot.

  2. #2
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Winsock problem

    Winsock will work if your friend is on a local network (I have done this myself), but if you and your friend are connecting through the internet then there is another whole complicated side of port forwarding, which could be your problem.

    An alternative to port forwarding is a program called Hamachi, which connects two or more computers over the internet as if they were on a local network.
    Both users have to have the program for this to work though.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Winsock problem

    It all depends on what connects your computers to the internet. If the computer's IP starts with 10, 172.16 - 172.31 or 192.168, you're using network address translation, so the router doing the translation has to forward the port to the computer that's running the program that's waiting for the connection (the "server").
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

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