import io from 'socket.io-client';

function hallConnector(hallUrl, joinRoomCallback) {
    this._socket = io.connect(hallUrl, {'forceNew': true});
    this._socket.on('connect', () => {
        this._socket.emit('client-get-partner');
    });
};

module.exports = hallConnector;

import io from 'socket.io-client';

function hallConnector(hallUrl, joinRoomCallback) {
    this._socket = io.connect(hallUrl, {'forceNew': true});
    this._socket.on('connect', () => {
        this._socket.emit('client-get-partner');
    });
    this._socket.on('server-join-room', (roomId) => {
        joinRoomCallback(roomId);
    });
};

module.exports = hallConnector;

Add server-join-room listener to hall connector
Add server-join-room listener to hall connector
