SOChaos Posted July 19, 2008 Share Posted July 19, 2008 (edited) Okay, so here's the deal. I've looked at almost every TCP Thread yet, lol. But for some reason, this doesn't work for me. Say I'm wanting a Game client to connect to a server: I'm using this: ;Starting the TCP Server now: ; Included Files ; ============================================== #include <SERVER_INFO.au3> ; Start Server Socket on port 8484 (Default Port) ; ============================================== TCPStartUp() $LOGIN_SERVER_SOCKET = TCPListen($LOGIN_SERVER_IP, $LOGIN_SERVER_PORT) If $LOGIN_SERVER_SOCKET = -1 Then MsgBox(0,"Error","Failed to start TCP Server on: " & $LOGIN_SERVER_IP & ":" & $LOGIN_SERVER_PORT) Exit EndIf ; Server Socket now created ; ============================================== ; Waiting for a client to connect ; ============================================== $LOGIN_CONNECTED_SOCKET = -1 Do $LOGIN_CONNECTED_SOCKET = TCPAccept($LOGIN_SERVER_SOCKET) Until $LOGIN_CONNECTED_SOCKET <> -1 MsgBox(1, "Connected", "New client Connected") Okay, now here's the thing, After I start the client, this SHOULD show the Message box saying a new client has connected right? I just started learning AutoIt, because I find it really interesting, so sorry if this is a stupid question, but I just wanted to know if I did something completely wrong. Edited July 19, 2008 by SOChaos Link to comment Share on other sites More sharing options...
iceberg Posted July 19, 2008 Share Posted July 19, 2008 looks like your $LOGIN_SERVER_IP & $LOGIN_SERVER_PORT have not been defined yet. mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
iceberg Posted July 19, 2008 Share Posted July 19, 2008 (edited) after your include statement, try this: (just an example) $LOGIN_SERVER_IP = "192.1.1.100" $LOGIN_SERVER_PORT = "1234" edit: typo Edited July 19, 2008 by iceberg mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
SOChaos Posted July 19, 2008 Author Share Posted July 19, 2008 I got it already, I had some help lol. But nah, they were Identified in another file which was Server_Info.au3, but thanks for trying. 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