protected override bool Receive(object m)
{
return WorkerForCommandHandler(message =>
{
var c = message as UdpConnected.Connect;
if (c != null)
{
var commander = Sender;
return registry => Props.Create(() => new UdpConnection(_udpConn, registry, commander, c));
}
throw new ArgumentException("The supplied message type is invalid. Only Connect messages are supported.");
})(m);
}