Jump to content

Chat Server in a LAN


Recommended Posts

Hi everyone.

I´ve just started with Autoit3 and i'm really getting into it. It's awesome.

My doubt is on TCP. I'm doing an simple chat. Here where i'm working we have an LAN, so the internet is connected trought an ADSL modem and after it is connected in a router that distribuite the network to the others computers.

When i use the macros and run in a computer in the LAN the result is like that:

include <Inet.au3>
Dim $ip
$ip = _GetIP()
MsgBox(4096, "Out put:","Adress by the GetIp: " & $ip)
$ip = @IPAddress1
MsgBox(4096, "Output", $ip)
$ip = @IPAddress2           
MsgBox(4096, "Output", $ip)
$ip = @IPAddress3
MsgBox(4096,"Output", $ip)
$ip = @IPAddress4
MsgBox(4096, "Output", $ip)

In the GetIp() function i get the public IP (Internet) and on the @IPAddress1 i get the IP of the computer in the LAN.

So how i could use a computer in the LAN for to be a server in a chat? Not on the LAN, but on the internet. The Client Chat will need to connect in the public IP and after in the adress on LAN?

Thanks.

Bruno

Link to comment
Share on other sites

is the adsl modem using NAT ? if it is then you cant "host" chat server from there without configuring the nat...

hope i understood your problem right :rolleyes:

But the problem is that the adsl modem is connected in a router, so is the router that has the public IP and the others machines in the network has an IP that is the router that gives to them.

So, how could i acess the Public Ip from an machine that is connected on the network for it can be an chat server (through the internet)?

Thanks.

Link to comment
Share on other sites

if its someting like this maybe?(the ip:s arent propably same doh)

then just configure them to forward corretly all the way through :rolleyes:

and your server needs to listen ip 10.0.0.15

any help? :/

It´s just like this.

So what i understood, is that i need to congurate my router to redirect the data that are coming to the computer that i want to be a server.

Thanks

Bruno

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