Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Oct 23, 2017 1:14 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Socket Disconnection check
PostPosted: Wed Mar 06, 2013 10:47 am 
Offline

Joined: Tue Oct 30, 2012 4:23 am
Posts: 22
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
 Profile  
Reply with quote  
 Post subject: Re: Socket Disconnection check
PostPosted: Wed Mar 06, 2013 3:53 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
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)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group