Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public sessionId;
- constructor(){
- var socket = io.connect('http://**.***.***.***:****');
- socket.on('connect', function (data) {
- console.log('user connected');
- socket.emit('add user', { userId: uid });
- });
- socket.on('create channel', function (data) {
- console.log(data);
- this.sessionId = data.sessionId; //error
- this.function(); //error
- socket.emit('feedback', { received: true });
- });
- }
- function(){}
Add Comment
Please, Sign In to add comment