benzrf 0 Posted November 27, 2010 I've been getting really weird results, if not errors, when I try to use the TCP functions. With something likeTCPStartup() $socket = TCPListen("192.168.1.3", 64432) MsgBox(0, @error, $socket)I get a msgbox with the caption "0" and the text "1688". ALWAYS. Even when I pick another port (except for ones that are already in use like 80 (I have an HTTP running)). I don't have any kind of program running that would do that. Unless... My father recently installed WebRoot. That couldn't be it, could it? Thanks in advance. Share this post Link to post Share on other sites
Steveiwonder 0 Posted November 27, 2010 (edited) TCPStartup() $socket = TCPListen(@IPAddress1, 64432) MsgBox(0, @error, $socket) The return you are getting is normal. Its the socket identifier. What are you trying to achieve? Try this, and then open a cmd and "telnet 127.0.0.1 64432" - you'll see it works. TCPStartup() $socket = TCPListen("127.0.0.1", 64432) While True $conns = TCPAccept($socket) if $conns >= 0 Then MsgBox(0, "Connected", "Connection received") exit EndIf WEnd Edited November 27, 2010 by Steveiwonder They call me MrRegExpMan Share this post Link to post Share on other sites
benzrf 0 Posted November 27, 2010 REALLY? In my experience, it keeps returning -1 until someone actually connects. **shrug** Ok. I'll try it ty Share this post Link to post Share on other sites
Steveiwonder 0 Posted November 27, 2010 (edited) TCPListenReturn ValueSuccess: Returns main socket identifier. Failure: Returns -1 or 0 and set @error. @error: 1 IPAddr is incorrect. 2 port is incorrect. Edited November 27, 2010 by Steveiwonder They call me MrRegExpMan Share this post Link to post Share on other sites
Tvern 11 Posted November 27, 2010 In my experience, it keeps returning -1 until someone actually connects.I believe you're thinking of TCPAccept(). Share this post Link to post Share on other sites