CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Problem with "accept" function

  1. #1
    Join Date
    Sep 2010

    Problem with "accept" function

    Hi to all,

    I am developing a TCP server for Windows XP, with VS2005, C++

    The program works perfectly, it can accept several input connections simultaneously, and
    the processing of input packets and the generated output responses are carried out without
    any problem.

    However, when the server is running for approximately 3 days without receiving input
    connections, it starts to consum a lot of CPU resources (I see the task manager, and it is near 100%).

    Because of I save a log file, where information about response of "accept" function is stored
    (for both, accepted connections, and errors in the function) I understand that the program
    resources are consumted by the "accept" function

    The "accept" function is called by means of a blocking socket.

    ┐Somebody that have suffer something similar could help me?

    Thanks in advance

  2. #2
    Join Date
    Sep 2010

    Re: Problem with "accept" function

    Sorry, I forgot to write that the program remains blocked in the function "accept", while the CPU processing is near to 100%. It is, the call to "accept" functions never returns.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)