Hello, first: I'm "Autoit Watcher/Viewer" i was watching this forum and it's posts with old acc i don't remember it's email/user whatever, i wanna say: "hey Melba23 you really helped most of members here include me and i just wanted to tell you god save you. ^^"
i want to make a little private chat/connection between me and my friends, And control the chat server whether shutting-down it or open it, but the problem ocurrs when i try to recieve the connections.
My question is : The TCPListen() creates a socket to listen to an specific "IP Connection", So do i need to type in each friends' ip to can connect to my chat? Or what should i do to make everyone of them connect to me easly without needing to create single script for every friend to join me.E.g.
;The server script :
Global $ip = "0.0.0.0", $port = 12345
Func ServerSided()
While 1
$s_listen = TCPListen($ip, $port) ; Here i want it to Listen to any incoming "IP Connection" from my Friends/Script not listen only from the ip typed ! because i don't want to write new ip everytime their ip changes.
TCPAccept($s_listen)
If GUIGetMsg() = $GUI_EVENT_CLOSE Then Return False
Local $recvDt = TCPRecv($s_listen, 2048) ; recieve data from anyone connected to server. not a specific IP
_GUICtrlEdit_InsertText($edit, "msg from: " & $ip & @CRLF & $recvDt)
TCPCloseSocket($s_listen)
Sleep(10)
WEnd ; here the IP/Friend who sent the data. in this script the ip will be same everytime because the client and server are on the same pc. huhh :S
EndFunc ;==>ServerSided
;The client script :
$s_connect = TCPConnect($ip, $port) ; here i need friends/clients connect to the "SERVER IP" not their local ip !! and check whether server online or not
Those were a shorten scripts just to explain my needs,
I hope i explained well what i really need to do
and sorry for my english. ^ ^
any helps would be appreciated.