bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with Socket


From: David Sugar
Subject: Re: problem with Socket
Date: Thu, 05 Jul 2001 02:25:55 -0400
User-agent: Mozilla/5.0 (X11; U; Linux 2.2.16-9mdk i686; en-US; m18) Gecko/20001013

I would like to do a model Exception class in Common C++ for reasons like this. The current exception model does allow the setException method to change exception handling from THROW_OBJECT to something else, but the something else does not exist as yet.

David

Paul Marculescu wrote:

Hi!

I just discovered a problem in class Socket.
I made a server which sends a salute message when a client connects.

But it crashed when the computer was scanned, because, the scanner (
nmap ) closed the connection to quickly and there wasn't enough time to
construct a TCPSession. In fact the Socket from which the TCPSession
should be constructed didn't make it out of the constructor, because the
fd was invalid. So it tried to throw (Socket*)(this) but "this" wasn't
constructed so it crashed.

I made a little exception class and replaced the throw in
Socket::Socket( int ).

Any other suggestions?



--
Paul Marculescu


_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-commoncpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]