ProcessBootstrap.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.Remoting;
  5. using System.Text;
  6. using SuperSocket.SocketBase;
  7. using SuperSocket.SocketBase.Config;
  8. using SuperSocket.SocketBase.Provider;
  9. using SuperSocket.SocketBase.Metadata;
  10. namespace SuperSocket.SocketEngine
  11. {
  12. class DefaultBootstrapProcessWrap : DefaultBootstrapAppDomainWrap
  13. {
  14. public DefaultBootstrapProcessWrap(IBootstrap bootstrap, IConfigurationSource config, string startupConfigFile)
  15. : base(bootstrap, config, startupConfigFile)
  16. {
  17. }
  18. protected override IWorkItem CreateWorkItemInstance(string serviceTypeName, StatusInfoAttribute[] serverStatusMetadata)
  19. {
  20. return null ;
  21. }
  22. }
  23. class ProcessBootstrap : AppDomainBootstrap
  24. {
  25. /// <summary>
  26. /// Initializes a new instance of the <see cref="ProcessBootstrap" /> class.
  27. /// </summary>
  28. /// <param name="config">The config.</param>
  29. public ProcessBootstrap(IConfigurationSource config)
  30. : base(config)
  31. {
  32. //var clientChannel = ChannelServices.RegisteredChannels.FirstOrDefault(c => c is IpcClientChannel);
  33. //if(clientChannel == null)
  34. //{
  35. // // Create the channel.
  36. // clientChannel = new IpcClientChannel();
  37. // // Register the channel.
  38. // ChannelServices.RegisterChannel(clientChannel, false);
  39. //}
  40. }
  41. protected override IBootstrap CreateBootstrapWrap(IBootstrap bootstrap, IConfigurationSource config, string startupConfigFile)
  42. {
  43. return new DefaultBootstrapProcessWrap(bootstrap, config, startupConfigFile);
  44. }
  45. }
  46. }