qwertylol Posted April 19, 2007 Share Posted April 19, 2007 http://www.autoitscript.com/forum/index.ph...c=29882&hl=http://www.autoitscript.com/forum/index.ph...c=20589&hl=TCP Client Example:I was given these two links for ready-made server/client combo.what I don't understand is, it seems both uses While 1WEndto loop the send/recv of messages, how do I run the rest of the script to process the $data if the script uses an infinite loop for tcp functions alone ? Link to comment Share on other sites More sharing options...
ChrisL Posted April 19, 2007 Share Posted April 19, 2007 http://www.autoitscript.com/forum/index.ph...c=29882&hl=http://www.autoitscript.com/forum/index.ph...c=20589&hl=TCP Client Example:I was given these two links for ready-made server/client combo.what I don't understand is, it seems both uses While 1WEndto loop the send/recv of messages, how do I run the rest of the script to process the $data if the script uses an infinite loop for tcp functions alone ?The loop is to constantly poll for data ($data)What you do when you receive data is up to you, you could call a functionIf $data <> "" then MyFunc($data)But you always come back to this loop to poll for more data [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
qwertylol Posted April 19, 2007 Author Share Posted April 19, 2007 Do you mean, while the loop is infinite, somehow the rest of the non-server/client related script can run? What does it choose which line to run? Link to comment Share on other sites More sharing options...
ChrisL Posted April 19, 2007 Share Posted April 19, 2007 Do you mean, while the loop is infinite, somehow the rest of the non-server/client related script can run?What does it choose which line to run?Yes the loop is infiniteIf you didn't have a loop. you would start your server, it would check for data, chances are there wouldn't be any data so it would exit [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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