CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2005
    Posts
    2

    Question Problem with PrintWriter

    I have a printWriter that is on the server side. When a connection is is established to the server and the client get killed without properly closing the printwriter just hangs and never returns a call to any of it's method like flush(). or a println. If any one can help me it will be really great. I tried to use the checkError() method and it did the same problem.

    Here is the sample code out

    PrintWriter out = new.......

    out.println("Some string");
    out.print("A very large string");
    out.flush(); // this is where the call never returns .......

  2. #2
    Join Date
    Sep 2004
    Posts
    247

    Re: Problem with PrintWriter

    Did you call checkError() after flush() or instead of?

  3. #3
    Join Date
    Jun 2005
    Posts
    2

    Re: Problem with PrintWriter

    Any printWriter call after the last print() statement does not return. I was running my system in debug mode and when ever any call is made for printwriter after print() as I have out.flush() it just hangs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured