close

is it possible to find out if a ruby socket is in state ESTABLISHED or CLOSE_WAIT without actually sending or reading data?

s = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0) s.connect(Socket.pack_sockaddr_in('port', 'hostname')) ssl = OpenSSL::SSL::SSLSocket.new(s, sslcert) ssl.connect from here on i would like to check in a thread if the ssl connection and the underlying socket is still ESTABLISHED or if it went into CLOSE_WAIT after the default of ...

Best way to close nested streams in Java?

What is considered the best, most comprehensive way to close nested streams in Java? For example, consider the setup: FileOutputStream fos = new FileOutputStream(...) BufferedOS bos = new BufferedOS(fos); ObjectOutputStream oos = new ObjectOutputStream(bos); I understand the close operation needs to be insured (probably by using a fin...

Firefox extension to log out user after the page has been closed

Hello all. I am writing my first FireFox extension and I have some questions. Maybe someone can help. I have a website which requires login. The sign-in is one user per login type. So if I am logged with the username "tom" from one PC and go to other PC and try to login with the same details, it fails. When I click the log-out button fr...

Install Shield 2009 Premier, Uninstall doesn't close the process/gui

My application (developed using C#.net) is open now i uninstall, InstallShield gives message stating the application is already open and whether really want to close the application. Selection 'Ignore' continues uninstall. Some files and the exe of the application are not closed. How to close them by installshield on uninstall. Or there ...

Close application from captive IE session.

Folks, My question is: Can this be done better? and if so, How? Any ideas? We need to start a captive IE session from within an "invisible" C# .NET 3.5 application, and quit both the IE session and the "parent" application after processing a certain request. I've been mucking around with this problem for the last week or so... and thi...

How to close the command window of a batch file which was started by another batch file

Hi. I created a perl script which starts another script. But the started script must be closed after it has performed its task. How can I do it? I have tried the EXIT command but i didnt work. Thanks. ...

Closing Process of a Delphi App under Vista

When we created our program, it closed properly under XP, but under Vista, even though the program is closed, the process is often still running until I open task manager and manually kill the process. Any suggestions on how to make sure this is closed when we close the program? What a pain. Mark Gundy www.magchat.com ...

What is the Best Practice for Combating the Console Closing Issue?

After compiling console programs the console window closes immediately after running. What is the best practice for keeping it open? I've searched google loads, I'm used to codeblocks where you don't have to worry about it, but, I want to mess around with Visual Studio a bit and with VS, my console closes. All over the interwebz there ar...

close, dispose, finalize, GC, Idisposable,.... have you got a clear description of them ?

hi all i am completely confused about close, dispose, finalize, GC, Idisposable. Oh, could you please send me a clear description of them? ...

Javascript close() does not interrupt execution

I've noticed that the close() call in javascript does not interrupt execution, for example: if (true /* replace with some meaningful condition determining if we should close */) { close(); } alert("This window is not closing..."); Since noticing this I've fixed my code up to work as intended, I just wondered why this happened? ...

How to optimally clean up outgoing UrlConnection objects in high use multithreaded environment?

I have a use case where a servlet (that has reasonably high concurrent use) makes an outgoing URLConnection to retrieve some data REST style as part of its normal server-side processing logic. The connection is created and used each time the servlet is invoked as the URL is potentially different (but the domain is always the same). I ...

How do I wake select() on a socket close?

I am currently using select loop to manage sockets in a proxy. One of the requirements of this proxy is that if the proxy sends a message to the outside server and does not get a response in a certain time, the proxy should close that socket and try to connect to a secondary server. The closing happens in a separate thread, while the s...

Invalid link forces Internet Explorer to close

I have a web page with some javascript like this: location = '../AnotherPage.html'; If AnotherPage.html exists, all is well. If it doesn't, then I get two behaviours. If this is all running on my local machine, I get an "Access is denied" error. But if the pages are on another machine and I'm accessing it via a share, Internet Expl...

How to close dynamically created CDockablePane windows?

In my MFC (Feature Pack) application one can dynamically create docking panes to display charts/tables etc. However, I don't want to let the user open the same thing twice. I create a pane like this: // Create CMyDockablePane pPane pPane->Create(...); pPane->EnableDocking(CBRS_ALIGN_ANY); // Create CRect rcPane pPane->FloatPane(rcPane)...

Change button in jQuery dialog box

Hi there, I wonder, if there is a proper way to remove the default close button in the title bar and change it with other, to which I want to assign other function than Close. I manage to change the classes, but despite that, the close function seems to override to any in the titlebar. My current code for changing classes: var closeBu...

What causes a form to close without triggering any of the usual events?

I have a form that is closed unexpectedly immediately after showing it. I hooked all the usual events that occur when a form is closed, but none of it is fired (including Closed, Closing, FormClosed, FormClosing, VisibleChanged, Disposed). How can that happen? What can cause a form to disappear without any of the mentioned events firing?...

Capture window close event

I want to capture events that close editor window (tab) in Visual Studio 2008 IDE. When I use dte2.Application.Events.get_CommandEvents(null, 0).BeforeExecute I successfully captured such events: File.Close File.CloseAllButThis File.Exit Window.CloseDocumentWindow and others. If code in window is not acceptable, I stop the event (C...

Unity resolves WCFServiceClient and closing the WCFServiceclient

We are using unity to resolve the WCFService and the good practice of WCF says close the client once done. But if we are using unity when and how to close WCFServiceClient? Thanks ...

Button with an X at the upper-right corner of the form, how to catch this event @ C#

Which event is fired when I close a form with the X button? I want the event that fires only when the X button is pressed; I know that there is a FormClosing event, but the problem is that it fires each time when form is closed... It also fires when frm.close() executes, and I don't want that to happen. ...

Can calling Abort() on an IClientChannel proxy throw an exception?

Based on documentation and articles it is recommended to call Abort() on a client proxy if an unexpected exception/fault is encountered. See the following (simplified): MyServiceClient proxy = null; try { proxy = new MyServiceClient(); proxy.DoSomething(); proxy.Close(); } catch (Exception ex) { if (proxy != null) ...