Jump to content
Sign in to follow this  
Particle

tcplisten()

Recommended Posts

when u do $var = tcplisten(blah blah) and a computer connects to it, what data value does it return. is it just 1? if $var = 1 then etc.

Share this post


Link to post
Share on other sites

when u do $var = tcplisten(blah blah) and a computer connects to it, what data value does it return. is it just 1? if $var = 1 then etc.

It returns the Main Socket Indentifier.

;SERVER!! Start Me First !!!!!!!!!!!!!!!
$g_IP = "127.0.0.1"

; Start The TCP Services
;==============================================
TCPStartUp()

; Create a Listening "SOCKET"
;==============================================
$MainSocket = TCPListen($g_IP, 65432,  100 )
If $MainSocket = -1 Then Exit

It will return a value that is not -1.

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  

×
×
  • Create New...