Example #1
0
        public void SetupInstance(ApiAbstract api)
        {
            api.OnBroadcastMessage      += (s, t, m) => { OnBroadcastMessage?.Invoke(s, t, m); };
            api.OnRequestShutdown       += (t, st) => { OnRequestShutdown?.Invoke(t, st); };
            api.OnRequestUserDisconnect += (i) => { OnRequestUserDisconnect?.Invoke(i); };
            api.OnRequestMailNotify     += (i, s, b, t) => { OnRequestMailNotify?.Invoke(i, s, b, t); };

            var config = Config;
        }
Example #2
0
 public override void Start()
 {
     // Start OWIN host
     App = WebApp.Start(Config.Services.UserApi.Bindings[0], x =>
     {
         new UserApiStartup().Configuration(x, Config);
         var api = INSTANCE;
         api.OnBroadcastMessage      += (s, t, m) => { OnBroadcastMessage?.Invoke(s, t, m); };
         api.OnRequestShutdown       += (t, st) => { OnRequestShutdown?.Invoke(t, st); };
         api.OnRequestUserDisconnect += (i) => { OnRequestUserDisconnect?.Invoke(i); };
         api.OnRequestMailNotify     += (i, s, b, t) => { OnRequestMailNotify?.Invoke(i, s, b, t); };
         api.HostPool = Kernel.Get <IGluonHostPool>();
     });
 }
Example #3
0
 /// <summary>
 /// Asks the server to disconnect a user.
 /// </summary>
 /// <param name="user_id"></param>
 public void RequestUserDisconnect(uint user_id)
 {
     OnRequestUserDisconnect?.Invoke(user_id);
 }