mirror of https://github.com/kern/filepizza
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
294 B
JavaScript
13 lines
294 B
JavaScript
import io from 'socket.io-client';
|
|
import Actions from './Actions';
|
|
|
|
var socket = module.exports = io.connect(window.location.origin);
|
|
|
|
socket.on('token', function (token) {
|
|
Actions.setUploadToken(token);
|
|
});
|
|
|
|
socket.on('download', function (peerID) {
|
|
Actions.sendToDownloader(peerID);
|
|
});
|