ConnectionLost Event

The place where software developers meet

Moderator: marcus

ConnectionLost Event

Postby tiveria » Fri 14. Jun 2013, 13:10

The IRTransServer class has an event called ConnectionLost.
But if I manually shut down the server or use the server control ui to stop the server, the event is not fired.

How else can I detect if the irtransserver connection is lost?
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: ConnectionLost Event

Postby IRTrans » Sat 15. Jun 2013, 20:07

This behaviour is caused by the TCP Stack. A client might not immediately detect a closed session.
To make sure you will need to send a request to the irserver.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: ConnectionLost Event

Postby tiveria » Fri 21. Jun 2013, 12:11

Ok, are there any calls that do not create much load on the server and can be used as connection check without sending commands to the ir devices?
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: ConnectionLost Event

Postby IRTrans » Fri 21. Jun 2013, 16:16

An easy one would be

SetLoglevel(0)

It will throw an exception in case the connection is closed.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32


Return to APIs

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests

cron