not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
753 B

  1. const io = require('socket.io-client');
  2. const util= require('../utils');
  3. const url = 'http://129.21.91.149:3000';
  4. var sockets = [];
  5. //sockets['yaboi1'] = io.connect(url);
  6. //sockets['yaboi1'] = io.connect(url);
  7. sockets[0]= io.connect(url);
  8. sockets[0].emit('register', 'bigleaderman');
  9. sockets[0].emit('createRoom', {password:'123', capacity:'4'});
  10. for(var j = 0; j < 3; ++j){
  11. sockets[j+1] = io.connect(url);
  12. sockets[j+1].emit('register', 'UgandanKnuckles' + j);
  13. sockets[j+1].emit('joinRoom', {roomName:'bigleaderman', password:'123'});
  14. }
  15. //for(var r = 0; r < 7; ++r){
  16. //setTimeout(function(){
  17. for(var u = 1; u <= 3; ++u){
  18. sockets[u].emit('submitWord',util.getRandomWords(1)[0]);
  19. }
  20. // }, 5000);
  21. //}