Sign in to follow this  
Followers 0
Voltraire

How can I make two bots communicate each other over a network?

4 posts in this topic

Hi, I would like to be able to make two bots communicate over a local area network.

Are they any existing udf files for this. Someone mentioned tcp/udp methods im searching for an example that i can use to help.

Can anyone point me in rightr direction .

Thanks.

Share this post


Link to post
Share on other sites



i am also intrested in this

this would have alot of uses for me

waiting for an answer to this


http://sparticus.webhop.net

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Use the advanced search.

Search for TCP with "titles only".

That or search the helpfile, you're not gonna get much help until you show you made some work yourself.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Tcp would be a good way to go.

Here is an example Client:

$Startup = TCPStartup()
$Connect = TCPConnect("192.168.1.2", 31338)

 If $Connect = -1 Then
        MsgBox(0, "Error", "Error connecting to server")
    Else
        MsgBox(0, "Success", "Success connecting to server")
    EndIf

While 1
    ;Tcp recieve commands to get things the server sends
    ;Tcp send commands to send things to server
    Sleep(1)
WEnd

This will connect to a server (the server must already be running)

Server:

Global $Startup = TCPStartup()
Global $Listen = TCPListen("192.168.1.2", 31338)

While 1
    ;Accept new clients
    $Accept = TCPAccept($Listen)
    If $Accept > 0 Then
        MsgBox(0, "Server", "Connection present on socket " & $Accept)
    EndIf

    Sleep(1)
WEnd

This will help you start off.

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