kudrow Posted October 12, 2012 Share Posted October 12, 2012 I have been playing with the TCP functions and I almost have all of it working the way I want. The listening server runs fine and accepts income connections and receives data but the reply from the server never makes it to the client. Just imagine an instant messenger type of application where data is transferred between 2 devices on the same (already created) connection. FireFox was nice enough to provide me with his new examples for the help file but they are not exactly what I am looking for. So the basic idea is; The script waits for a connection and data. Once data is received the script sends the reply back to the orginating connection. Never close the connection until a close command is initiated. I hope I made this clear, if not let me know. Thanks! Link to comment Share on other sites More sharing options...
caleb41610 Posted October 12, 2012 Share Posted October 12, 2012 (edited) While 1 $recv = TCPRecv( $socket, 512 ) If $recv <> "" Then ; call a function EndIf $msg = GUIGetMsg( ) If $msg = $some_button Then TCPSend( $socket, GUICtrlRead( $some_edit_control ) ) EndIf WEnd If you had a GUI on both sides with main loops similar to this, you could send/receive both ways Edited October 12, 2012 by caleb41610 Multi-Connection TCP Server Link to comment Share on other sites More sharing options...
bogQ Posted October 12, 2012 Share Posted October 12, 2012 (edited) i made nice example not so long ago but you can search the formu for more examples.if you have problems, post what you have (some small replicator) so that we can help you moreedit: guess i shud post that in example scripts and add to it some coment and explanation, cos i think wer getting more and more questions regarding communication betwean client and server. Edited October 12, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
kudrow Posted October 14, 2012 Author Share Posted October 14, 2012 i made nice example not so long ago but you can search the formu for more examples.if you have problems, post what you have (some small replicator) so that we can help you moreedit: guess i shud post that in example scripts and add to it some coment and explanation, cos i think wer getting more and more questions regarding communication betwean client and server.Your example above worked like a champ. Thank you very much. On to the next part of trying to figure out how to run a script that controls the windows gui without actually being logged in to the desktop. Thanks again everyone. Link to comment Share on other sites More sharing options...
caleb41610 Posted October 14, 2012 Share Posted October 14, 2012 Your example above worked like a champ. Thank you very much. On to the next part of trying to figure out how to run a script that controls the windows gui without actually being logged in to the desktop. Thanks again everyone.I could be mistaken, but if a user is not logged in then there wouldn't be any program manager to interact with. Correct me if I am wrong though. Multi-Connection TCP Server Link to comment Share on other sites More sharing options...
kudrow Posted October 16, 2012 Author Share Posted October 16, 2012 I could be mistaken, but if a user is not logged in then there wouldn't be any program manager to interact with. Correct me if I am wrong though.You are correct, the only work around I have found is to use a virtual environment. They never lock or log out. 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