Jump to content

messaging specific variable


Recommended Posts

HotKeySet("^+x", "Exit_client")
Global $myip=@IPAddress1
 Global $connect=False
 Global $connection
 Global $packets
 global $masterip
TCPStartup()
$mainsocket=TCPListen($myip, 23465, 100) 
if $mainsocket = -1 then Exit  
While $connect=False 
    $connection=TCPAccept($mainsocket) 
    ToolTip("connection established") 
    $connect=True 
    while $connect=True 
        $packets=TCPRecv($mainsocket, 1024) 
        if $packets <> "" Then 
            if $packets = test Then 
                MsgBox(1, "test", "if you can see this, we have connection! =D") 
                $masterip=TCPRecv($mainsocket, 1024) 
                $choice=MsgBox(3, "test", "end connection?") 
                if $choice=6 Then 
                    MsgBox(1,"test","WHY?!?!?! we're ending this now anyway!")
                    Exit 
                Else 
                    MsgBox(1,"test", "so that's it!? you're going to be an ass like that?!")
                    Exit 
                EndIf 
            EndIf 
        EndIf 
    WEnd
 WEnd
Func Exit_client() 
    Exit
EndFunc

i made this little thing. well... i studied some code earlier.

now i'm going to do a sender thing by guessing where to put what.... xD

the issue at hand: this is not quite complete. i want $masterip to receive my ip, connect to it and send me a "we're connected! yay!" message.

not necessarily in that particular phrasing. except i don't know how to message that particular variable.

i can't even begin imagining the keywords for a search, or how to use the help file for that.

can i get some help on the topic?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...