public void Init(EC.IApplication application) { application.Disconnected += (o, e) => { Beetle.Express.IChannel channel = e.Session.Channel; Chat.Signout msg = new Signout(); msg.Name = channel.Name; msg.From = channel.EndPoint.ToString(); foreach (Beetle.Express.IChannel other in application.Server.GetOnlines()) { if (other != channel) { application.Server.Send(msg, other); } } }; }
static void Main(string[] args) { mApp = EC.ECServer.Open("ecApplicatonSection"); System.Threading.Thread.Sleep(-1); }