New topic: EasyTCPsocket console application
<http://forums.realsoftware.com/viewtopic.php?t=46336> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message p0wn3d Post subject: EasyTCPsocket console applicationPosted: Mon Dec 24, 2012 7:24 am Joined: Sun Oct 28, 2012 4:54 am Posts: 46 I have a client/server desktop application using EasyTCPsocket client side. I need to code a console version of the client but cannot find any examples. My desktop client currently has an super EasyTCPsocket class named mysocket and button on the main form. My button connect code is: mysocket.Address = "server.mydomain" mysocket.Port = 22 mysocket.Connect Mysockets connected event is Connector.SendMessage( Val( "51" ), data ) My question is how would this be done as a console application the client also needs to handle receivedMessage events etc.... Any help is gratefully appreciated Oh and everyone..... Top timhare Post subject: Re: EasyTCPsocket console applicationPosted: Mon Dec 24, 2012 1:01 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 11911 Location: Portland, OR USA In a ConsoleApplication, you have to provide your own event loop. This is the intended use of app.DoEvents. In the Run event of the ConsoleApplication, connect your socket and then loop: mysocket.Address = "server.mydomain" mysocket.Port = 22 mysocket.Connect while True app.DoEvents(50) wend Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
