Jump to content

Troubleshooting a chat script


Sokko
 Share

Recommended Posts

To enlighten myself about AutoIt's network functions, I'm attempting to create a fairly basic TCP chat program. The only problem is, so far I haven't been able to test it successfully, so I'm kind of stuck. As far as I can tell it should work fine, but I've never used these functions before and I don't know whether I'm doing something wrong with the script or the testing environment.

Currently I am trying to run the server on this PC from my regular cable connection, and the client from a dial-up connection on an old computer. I hit Connect on the server, then Connect on the client and type in the IP address of the server, but it just displays the "can't connect" error after a few seconds' delay. I have tried opening port 8700 to the internet on my firewall, as well as compiling the server script and allowing it full access, but no dice. I can do a command-line ping from the client if I allow outside ping requests on the server, and it completes successfully, so that makes me think it's more of a problem with the code.

EDIT: Problem solved

Edited by Sokko
Link to comment
Share on other sites

i didn't look at anything but i know that for testing connections you can target your own comp (127.0.0.1) and run both scripts on one computer. i also have a little program i made in vb that can listen or connect on to whatever address and port you choose. hope that helps.

PortPlay.zip

Link to comment
Share on other sites

Okay, I think I figured out the problem. Using your tip, I found that you need to open a receiving socket on your actual IP address, not 127.0.0.1 (which apparently has some special properties that I'm not fully aware of). It wasn't working when I tested both client and server on the same computer before, so I assumed you needed two unique IPs to make a connection. Thanks for pointing me in the right direction!

Link to comment
Share on other sites

  • 1 month later...

What is PortPlay.EXE? Could you share the source?

Gene

i didn't look at anything but i know that for testing connections you can target your own comp (127.0.0.1) and run both scripts on one computer. i also have a little program i made in vb that can listen or connect on to whatever address and port you choose. hope that helps.

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...