New topic: Socket Disconnection check
<http://forums.realsoftware.com/viewtopic.php?t=47182> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message mapmusic Post subject: Socket Disconnection checkPosted: Wed Mar 06, 2013 10:47 am Joined: Tue Oct 30, 2012 4:23 am Posts: 18 Hello Network Gurus, I have app using TCP Socket. I create connection properly and everything is fine. I receive messages over it. Problem is when I need to check disconnection , I am not sure how is the best way to do it. How to fire Error Event ? When I unplug ethernet cable I am not able to get error. Socket.Isconnected is true also after removing cable.(I check it for a couple of minutes) Only way I found is to do "Socket.Connect" and then wait for error, but I dont want use this way to check it. Have you any other tips ? Thanks Martin _________________ --- @MacOS 10.7.5/MBPro Top npalardy Post subject: Re: Socket Disconnection checkPosted: Wed Mar 06, 2013 3:53 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7751 Location: Canada, Alberta, Near Red Deer mapmusic wrote:Hello Network Gurus, I have app using TCP Socket. I create connection properly and everything is fine. I receive messages over it. Problem is when I need to check disconnection , I am not sure how is the best way to do it. How to fire Error Event ? When I unplug ethernet cable I am not able to get error. Socket.Isconnected is true also after removing cable.(I check it for a couple of minutes) Only way I found is to do "Socket.Connect" and then wait for error, but I dont want use this way to check it. Have you any other tips ? Thanks Martin TCP is fun It wont know it's disconnected until the next time it tries to send and then you'll get an error _________________ Norman Palardy (Real Software) ââââââââââââââââââââââââââââââââââââââââââââââââââ Real Studio Developer Conference - April 23 - 26, 2013 http://www.realsoftware.com/community/realworld.php 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]
