How can I test "accept" error handler?

How can I test "accept" error handler?

Post by Moshe Zuisma » Mon, 29 Oct 2001 22:23:52



Hi dear ALL!
I have a problem , testing my error handler for "accept" function. On site
of one of my custommers , I have a situation , that on some "mysterious"
conditions , it seems , that function "accept" (blocking mode) fails ...
code looks like this:
____________________________________________________________________________
_______________
try
{
    my_socket->accept(*SocketPtr);
    if (m_CBObjectPtr)
     m_CBObjectPtr->Accept(SocketPtr);
   }
   catch (os_network_toolkit_error& error )
   {
            DIAG_PDEF (1, "TCP Server thread: accept for connections on port
"
                << m_PortNumber << " has failed. " <<
                "Native Error code is " << error.native());
            int result = ServerSocketReinit(error.native());
            if( result==-1 )
                break;
   }
Quote:}

____________________________________________________________________________
____________
Here my_socket - is an ObjectSpace os_server_socket object , that act as
some wrapper for native Sockets API.
THE PROBLEM IS: - I dose success to reproduse situation of "accept"
failure....
I have tried to bombard my application with large number of connections - it
did not cause failure ....
How can I cause "accept" call to fail , to test my error handling routings?
Any help will be greatly appreciated...
 
 
 

How can I test "accept" error handler?

Post by Mosh » Tue, 30 Oct 2001 01:00:30


Sorry - I mean - I DOSE NOT SUCCESS .....
Quote:> THE PROBLEM IS: - I DOSE SUCCESS to reproduse situation of "accept"
> failure....
> I have tried to bombard my application with large number of connections - it
> did not cause failure ....
> How can I cause "accept" call to fail , to test my error handling routings?
> Any help will be greatly appreciated...