TCP help

02/06/2014 20:09 LiveLong23#1
Hi i have problem with connection to a server, when i try to connect it tell me that connection cant be established :confused:

i tried to ping that adress in cmd and it all fine

Code:
Opt("TCPTimeout", 100) ;100 milliseconds

TCPStartup()
$ip = TCPNameToIP("login.justac.net") ; = 192.200.116.253
$port = 11000
$socket = TCPConnect($ip, $port)

If $socket = -1 Then
	ToolTip("The connection to the server could not be established!", 0, 0)
Else
	ToolTip("Connection established", 0, 0)
EndIf

While 1
	Sleep(100)
WEnd
02/06/2014 20:17 alpines#2
Probably the script got blocked by your firewall? Also Shutdown TCP again.
02/06/2014 20:20 YatoDev#3
100 milliseconds ? some more will be ok because sometimes it takes some time if there are more connects on The server or some other things

Do you have admin rights ?
#RequireAdmin
In windows vista its needed often
02/06/2014 20:24 LiveLong23#4
Ah my bad i was need to connect to remote server i used it like this now and its works

Code:
Opt("TCPTimeout", 100) ;100 milliseconds

Local $ip = "login.justac.net"
Local $port = 11000

; Start The UDP Services
;==============================================
UDPStartup()

; Connect to a Listening "SOCKET"
;==============================================
Local $socket = UDPOpen($ip, $port)

If $socket = -1 Then
	ToolTip("Cant establish connection", 0, 0)
Else
	ToolTip("Connected", 0, 0)
EndIf

While 1
	Sleep(100)
WEnd
Do you know maybe how i can check current patch version in registry with patch on server
i have in registry like this

[Only registered and activated users can see links. Click Here To Register...]
02/06/2014 20:24 alpines#5
(My ping to that address is above 150ms so I recommend you to unset your Timeout or to set it to at least 300~500.)

Why did you try TCP first and not UDP if the server handles UDP?
02/06/2014 20:26 LiveLong23#6
im testing this first time so i forgot to read good in help file ;D

Open a socket connected to an existing server .
UDPOpen ( IPAddr, port [, flag] )