I'm in over my head and sinking fast...

Hi all,

I'm trying to create a version of TCPServer that will instead accept UDP connections.  I started by copying TCPServer, TCPServerConnection, TCPServerConnectionFactory, TCPServerDispatcher, TCPServerParams, ServerSocket, and ServerSocketImpl over to "UDP" equivalents and made everything point to DatagramSocket[Impl] instead.  I also had to tweak DatagramSocket to make DatagramSocket(SocketImpl* pImpl); public equivalent to StreamSocket(SocketImpl* pImpl);.

Everything compiles up nicely, but I blow up just trying to create an UDPServerSocket (throws an "Operation Not Supported" when it tries to listen).  Here's the specific constructor code:

UDPServerSocket::UDPServerSocket(Poco::UInt16 port, int backlog): DatagramSocket(new UDPServerSocketImpl)
{
    IPAddress wildcardAddr;
    SocketAddress address(wildcardAddr, port);
    impl()->bind(address, true);
    impl()->listen(backlog);  // <-  error throws here
}

UDPServerSocketImpl is a direct copy of ServerSocketImpl, but extends DatagramSocketImpl instead of SocketImpl - which overrides neither bind nor listen from the base SocketImpl class.  Also, FWIW, I can change my calling code to just a plain ServerSocket/TCPServer instead and the code all executes perfectly fine.

If anyone can wind me up and point me back in the correct direction it would be greatly appreciated.  For that matter, have I gone off my rocker?  Is what I'm trying to do even practical?  Has anybody done this before and I'm just reinventing the wheel?

Thanks!

Casey