public static PackerHander GetInstance() { lock (lockthis) { if (_My == null) _My = new PackerHander(); } return _My; }
static void Main(string[] args) { PackerHander.GetInstance().Loading(); server.BinaryInput = new BinaryInputHandler(BinaryInputHandler); server.Connetions = new ConnectionFilter(ConnectionFilter); server.MessageInput = new MessageInputHandler(MessageInputHandler); server.MessageOut += new EventHandler <LogOutEventArgs>(server_MessageOut); server.Start(); Console.ReadLine(); }
public static PackerHander GetInstance() { lock (lockthis) { if (_My == null) { _My = new PackerHander(); } } return(_My); }