Exemplo n.º 1
0
 private Server() {
     this.Pubnub = new Pubnub(PubKey, SubKey, SecretKey) { SessionUUID = Uuid };
     this.Pubnub.Subscribe<string>(Channel, this.HandleMessage, DefaultCallback, ErrorCallback);
     //this.pubnub.Presence<string>(this.channel, this.handlePresence, this.defaultCallback);
     Console.WriteLine("Server created.");
     this.db = Database.getInstance();
 }
Exemplo n.º 2
0
 public static Database getInstance() {
     return instance ?? (instance = new Database());
 }