|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
A means to check if Sage is shutting down?
I'd like to try and close my socket server in java in a happy manner when Sage closes. Right now, my server stays in an infinite loop, even if a client disconnects (then it just waits for a new one), but I could put in some kind of check to see if Sage is closing and then I could close the server socket. I've looked through the API for some kind of IsShuttingDown() call, but nothing. I found Exit(), but that closes Sage,which isn't my goal here.
|
#2
|
||||
|
||||
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#3
|
||||
|
||||
I don't know if this would be of any help, but there is an ApplicationExiting hook that can be used in the STV, where you could shut things down when SageTV is about to exit. But, this would only be useful when using a SageTV UI; the service wouldn't call such a hook since it doesn't use an STV. Niel's suggestion is probably better, but I figured I would toss this one out anyway.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#4
|
||||
|
||||
... and if you just need to close the socket(s), don't worry about it -- the OS will do that for you when the application exits...
If you need to send some 'i am shutting down' message to the clients, then thats different
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#5
|
|||
|
|||
Well, I'm trying to track down a problem I'm having. I can get my CQC driver to connect as a client to my Sage/java server just fine...and they're all happy. However, when I close Sage, my CQC driver does not detect that the socket has been closed...it still acts like it's connected. So I'd like to see if I send the socketserver.close() command, if that would do it.
Now that I think about it, I guess I can just send a command and have Sage close the server manually without exitting altogether, and then I'll see how the other side reacts. Then I'll know if it's a bug in the CQC side, or if I really do need to manually kill the server. thanks for the info, nielm...I'll probably do that also. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|