Voltraire Posted December 14, 2009 Share Posted December 14, 2009 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. Link to comment Share on other sites More sharing options...
silurian Posted December 14, 2009 Share Posted December 14, 2009 i am also intrested in this this would have alot of uses for me waiting for an answer to this http://sparticus.webhop.net Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 14, 2009 Share Posted December 14, 2009 (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 December 14, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
darkjohn20 Posted December 14, 2009 Share Posted December 14, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now