Jump to content
Sign in to follow this  
venkatb

Problem with TCPListen()

Recommended Posts

venkatb

Hi, i made a network(LAN) of 2 computers. I tested by pinging each other and was fine. But when i run the following script its not working..

TCPStartup() ; Working and returning "True"

TCPListen("192.168.0.3", 65432, 100) ; 192.168.0.3 is the IP of the 2nd computer on my network

Now it is returning "-1", which is an error.

Please EXPLAIN ME WHAT COULD BE THE POSSIBLE REASON...

Share this post


Link to post
Share on other sites
Andreik

Hi, i made a network(LAN) of 2 computers. I tested by pinging each other and was fine. But when i run the following script its not working..

TCPStartup() ; Working and returning "True"

TCPListen("192.168.0.3", 65432, 100) ; 192.168.0.3 is the IP of the 2nd computer on my network

Now it is returning "-1", which is an error.

Please EXPLAIN ME WHAT COULD BE THE POSSIBLE REASON...

In this case 192.168.0.3 is IP of server. If you want to create a TCP server from your computer use @IPAddress1.

If you don't solve your problem use @error to detect error.

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
venkatb

In this case 192.168.0.3 is IP of server. If you want to create a TCP server from your computer use @IPAddress1.

If you don't solve your problem use @error to detect error.

Hi ...friend...do you mean that in case of ...

TCPListen($IP, 65432, 100)

is $IP is the IP address of the computer on which i am running this script?...I am not clear about the concept...

Share this post


Link to post
Share on other sites
Andreik

Hi ...friend...do you mean that in case of ...

TCPListen($IP, 65432, 100)

is $IP is the IP address of the computer on which i am running this script?...I am not clear about the concept...

@IPAddress1 is a macro that return IP address of first network adapter.

If you want to use this form

TCPListen($IP, 65432, 100)

you must assign value to $IP

$IP = @IPAddress1
TCPListen($IP, 65432, 100)

When the words fail... music speaks

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.