Sign in to follow this  
Followers 0
AzKay

TCP Help.

5 posts in this topic

#1 ·  Posted (edited)

Client

TCPStartup()
$ip = InputBox("IP", "Enter IP to connect to", @IPAddress1)
$port = InputBox("Port", "What port are they using?", "5900")
$con = TCPConnect($ip, $port)

If @error Or $con < 1 Then
    MsgBox(0, "Error", "Could not Connect")
    Exit
EndIf

While 1
    TCPSend($con, InputBox("", ""))
WEnd

Few questions,

1, How can I have this so multiple people can connect? ~ Found the answer Here

2, How can I have the server reply back to the client?

eg; Client > Server "Hello", Server > Client "OK"

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



Bumping topic off second page.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Bumping topic off second page.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Case StringLeft($msg, 5) = "[300]" ;Login
                $oCommand = StringTrimLeft($msg, 5)
                $oParam = StringSplit($oCommand, ",")
                If IsArray($oParam) Then
                    MsgBox(0, "Login", $oParam[1] & ":" & $oParam[2])
                EndIf
tcpsend($con,'OK');answer

You can use the same connection started by client to send a message.


A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]

Share this post


Link to post
Share on other sites

I see. So simple.

Thanks x3


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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  
Followers 0