Jump to content

TCP listen and TCP accept for any IP ?


Recommended Posts

hi all

i am making a script that u run a script on a PC and then send a shutdown command from another PC from another script through the internet

i'am using TCP functions

the problem is that i only know the IP address of the PC that will receive the command 

and when i want to use the TCP listen i and TCP accept i have to specify the ip to listen for (wich i don't have)

 

can i make the receiver PC listen to all IPs at a specified port ?

tnx in advanced...

Edited by alexander95

Link to comment
Share on other sites

  • Developers

You need to run that by me again but this time slowly as the above doesn't make much sense. ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

FireFox

 

bro: @IPAddress1 macro it give the local IP i am sending the command through the internet wich i must use the Global IP

You cannot listen to the global IP as it belongs to your local router.

You also need to create a port forwarding on that device in order to make this working.

Or a third party server in the middle where both PCs can connect to to receive the commands.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

bro

Who is bro?

 

@IPAddress1 macro it give the local IP i am sending the command through the internet wich i must use the Global IP

You don't understand how it works, the server listens for incomming connections so it uses its local IP.

 

You cannot listen to the global IP as it belongs to your local router.

It depends on how your network is made, but yes it's not a global IP for the individuals.

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

  • Developers

Jos

i'm sorry i don't understand what u mean 

u didn't understand the idea i'm talking about ? 

u want me to retell it with another words ?

The problem is that you are not making clear what you want to do so I asked you to explain it better.

Your title says you want to listen on any IP, but you clearly do not understand how this works when being on an LAN behind a LAT router connected to the internet.

So define clearly what you you want to do and you might get some better explanations and help.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I think he needs to make all the clients connect to one server or a database with the IP Addresses of the servers.

Edited by EKY32

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

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...