mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
removing networkmanager
This commit is contained in:
parent
2cc8070065
commit
c186770a50
@ -1,27 +0,0 @@
|
||||
///<reference path="../typings/main.d.ts"/>
|
||||
|
||||
|
||||
import * as _socketIo from 'socket.io';
|
||||
import {MessageTypes} from "../common/MessageTypes";
|
||||
import {User} from "../common/entities/User";
|
||||
import {LoginCredential} from "../common/entities/LoginCredential";
|
||||
|
||||
import * as _debug from 'debug';
|
||||
var debug = _debug("PiGallery2:NetworkManager");
|
||||
|
||||
export class NetworkManager{
|
||||
private socketIo:SocketIO.Server;
|
||||
|
||||
constructor(http){
|
||||
|
||||
this.socketIo = _socketIo(http);
|
||||
|
||||
this.socketIo.on('connection', function(socket:SocketIO.Server){
|
||||
debug("Client Connected");
|
||||
socket.on(MessageTypes.Client.Login.Authenticate,(credential:LoginCredential) =>{
|
||||
debug("Message: " + MessageTypes.Client.Login.Authenticate);
|
||||
socket.emit(MessageTypes.Server.Login.Authenticated,new User("Dummy user","dummy@mail.com","password"));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user