modification to get SuperSocket working within a WCF service

Jul 31, 2016 at 11:42 PM
Hello

here a modiciation to do in the source code to have SuperSocket usable in a WCF service. Without that modification a null reference exception is raised, crashing the server when starting

The modification allows to work correctely but "public class XXXXX : CommandBase<AppSession, StringRequestInfo>" are not recognised. This is working only with your callback on appServer.NewRequestReceived

Modification to do :
file SuperSocker.SocketBase/Command/ReflectCommandLoader.cs
            if (!commandAssemblies.Any())
            {
                //commandAssemblies.Add(Assembly.GetEntryAssembly());
                commandAssemblies.Add(GetMyEntryAssembly());
            }
with
        private static Assembly GetMyEntryAssembly()
        {
            if (Assembly.GetEntryAssembly() == null)
            {
                return Assembly.GetExecutingAssembly();
            }
            else
            {
                return Assembly.GetEntryAssembly();
            }
        }
hope that will help