Further setup for websocket handler

This commit is contained in:
GloriousCode
2017-09-11 19:08:52 +10:00
parent 126c9e1646
commit 6d02dfe057
3 changed files with 18 additions and 11 deletions

View File

@@ -9,13 +9,8 @@ import { WebsocketHandlerService } from './../../services/websocket-handler/webs
export class ChatbuttonComponent implements OnInit {
constructor(private chatService: WebsocketHandlerService) {
chatService.messages.subscribe(msg => {
if(msg.Event === 'orderbook_update') {
console.log("Response from websocket: " + JSON.stringify(msg));
} else {
console.log("recieved unsubscribed event of type: " + msg.Event)
}
});
chatService.messages.subscribe(msg => {
});
}
ngOnInit() {
@@ -27,7 +22,7 @@ export class ChatbuttonComponent implements OnInit {
}
private authenticateMessage = {
Event:'auth',
data:{"username":"username","password":"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"},
data:{"username":"Username","password":"16f78a7d6317f102bbd95fc9a4f3ff2e3249287690b8bdad6b7810f82b34ace3"},
}
authenticate():void {