Inheriting from System.Net.Sockets.Socket problems.

Inheriting from System.Net.Sockets.Socket problems.

Post by Tony Cadut » Wed, 18 Aug 2004 10:07:14


Hi,
I was trying to create a new class derived from System.Net.Sockets.Socket
and it seemed to be working until I tried to use the accept method.
The accept method returns a Socket object and for some reason you can't
typecast it as the derived class.
Everything else worked fine, I was able to add new methods etc etc

Is there a way around this?

Thanks,
 
 
 

Inheriting from System.Net.Sockets.Socket problems.

Post by dGJhaW » Wed, 18 Aug 2004 21:21:01

Try overriding the "Accept" method to return one of your derived class objects.

Thom