Jump to content
Sign in to follow this  
Delta01

Is TCP only for local connections?

Recommended Posts

Delta01

Is TCP only used for computers on the same network? I need to send data from one computer to another, that aren't connected locally. All the scripts I've found have been for sending locally and using @IpAddress1 to send on and to receive on. I ask because I want to create an app that sends data to another computer, when it receives a certain command.

Can someone show me a short example of sending to a computer, say in a different country. Assume the IP is: 111.111.111.111 that way it should be easy for me to understand.

Thanks

Edited by Delta01

Share this post


Link to post
Share on other sites
Glyph

UDP = LAN

TCP = WAN

TCP + Router = Port forwarding and firewall configuring.

Either of them will work with the other (LAN / WAN), but their practical uses are the above.

Edited by BackStabbed

tolle indicium

Share this post


Link to post
Share on other sites
martin

Is TCP only used for computers on the same network? I need to send data from one computer to another, that aren't connected locally. All the scripts I've found have been for sending locally and using @IpAddress1 to send on and to receive on. I ask because I want to create an app that sends data to another computer, when it receives a certain command.

Can someone show me a short example of sending to a computer, say in a different country. Assume the IP is: 111.111.111.111 that way it should be easy for me to understand.

Thanks

It doen't really matter whether the computer is local or remote, TCP will work the same way. But when you send to a computer on another network it could be behind a router so it will need port forwarding set and you need to send to the IP address of the router (which is the address you would get from www.whatismyip.org). The same might apply to the computer you are sending from.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
martin

UDP = LAN

TCP = WAN

TCP + Router = Port forwarding and firewall configuring.

Not so. UDP is probably used more on a LAN where the chances of losing packets is very slim and where the extra speed is needed, but both UDP and TCP work on LANs and WANs.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Glyph

UDP is probably used more on a LAN

Um...? Read what you just said. :D

and I didn't mean to say that UDP wont work over WAN, or that TCP won't work over LAN.

@ Delta01:

The script you are using seems to be having trouble authenticating client, and by coincidence i'm working on the same thing (TCP) as you are.

If you have AIM, I could help you with this a bit quicker... and maybe work on it together faster? (if you're making a chat)

There's an old version Smith made that's very simple and user friendly, just add a GUI around it and fill in some commands.

Edited by BackStabbed

tolle indicium

Share this post


Link to post
Share on other sites
Delta01

Ahh, thanks. What would I forward a port to? If my application was called, say: Delta01.exe would I forward the port it sends on and the local IP with that application name?

Share this post


Link to post
Share on other sites
Glyph

Forward the port that the program is binding to, let's say the server litens to port 456... then you would forward TCP:456.

so.. yeah to what you said.

Edited by BackStabbed

tolle indicium

Share this post


Link to post
Share on other sites
martin

Ahh, thanks. What would I forward a port to? If my application was called, say: Delta01.exe would I forward the port it sends on and the local IP with that application name?

If you have a router then it will have some way of setting it up, usually you type the setup ip address of the router into the address bar of a browser. For my router it's the same ip as my PC except that the last octet is 254, I don't know but maybe that's standard. You tell it that anything received for port 3456 is to be sent to 192.168.1.7 say or to a particular PC. The application on the PC whose address is 192.168.1.7 has to be looking for data on port 3456.

EDIT: I'm a lot slower than BackStabbed!

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Delta01

Well, dam. If I'm going to need to forward a port on each computer then there's not much point. Is there any way I can upload a .txt file to a server without opening any windows or anything? Because ten I could use INetGet() and just read the text file

Share this post


Link to post
Share on other sites
martin

Well, dam. If I'm going to need to forward a port on each computer then there's not much point. Is there any way I can upload a .txt file to a server without opening any windows or anything? Because ten I could use INetGet() and just read the text file

There are some free web servers around, and even ones you have to pay for can be very cheap. They usually provide tools to let you upload and manage your site.

You can upload using ftp methods in an AutoIt script without needing any gui's.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Xwolf

Is there having some scripts for me to use.

I need simple examples.

Thanks!!!

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.