Jump to content
Sign in to follow this  


Recommended Posts

Hello all I like to known how to use tcpsend on a tcplisten to send data as soon a someone connects

here is the code i started with i can not get tcpsennd to work

;SERVER!! Start Me First !!!!!!!!!!!!!!!

$g_IP = ""

$data ="123"

$nport = "23"

; Start The TCP Services



; Create a Listening "SOCKET"


$MainSocket = TCPListen($g_IP, $nport, 100 )

If $MainSocket = -1 Then Exit

; look for client connection


While 1

$ConnectedSocket = TCPAccept( $MainSocket)

If $ConnectedSocket >= 0 Then

;TCPConnect( $g_IP, 23 )


msgbox(0,"","my server - Client Connected")




$socket= TCPConnect( $g_IP, $nport)


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