entryHandler.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var EntryHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. EntryHandler.prototype.entryRequest = async(function(c2s_uid,c2s_token,c2s_logicServerId,c2s_deviceMac,c2s_deviceType,c2s_clientRegion,c2s_clientChannel,c2s_clientVersion){
  12. return await(this.socket.requestAsync('connector.entryHandler.entryRequest',{c2s_uid:c2s_uid,c2s_token:c2s_token,c2s_logicServerId:c2s_logicServerId,c2s_deviceMac:c2s_deviceMac,c2s_deviceType:c2s_deviceType,c2s_clientRegion:c2s_clientRegion,c2s_clientChannel:c2s_clientChannel,c2s_clientVersion:c2s_clientVersion}));
  13. });
  14. EntryHandler.prototype.bindPlayerRequest = async(function(c2s_playerId){
  15. return await(this.socket.requestAsync('connector.entryHandler.bindPlayerRequest',{c2s_playerId:c2s_playerId}));
  16. });
  17. EntryHandler.prototype.getSysTimeRequest = async(function(){
  18. return await(this.socket.requestAsync('connector.entryHandler.getSysTimeRequest',{}));
  19. });
  20. EntryHandler.prototype.enterCrossServerRequest = async(function(){
  21. return await(this.socket.requestAsync('connector.entryHandler.enterCrossServerRequest',{}));
  22. });
  23. EntryHandler.prototype.exitCrossServerToLogicServerRequest = async(function(){
  24. return await(this.socket.requestAsync('connector.entryHandler.exitCrossServerToLogicServerRequest',{}));
  25. });
  26. EntryHandler.prototype.onLoginQueuePush = function(cb){
  27. this.socket.on('connector.entryPush.loginQueuePush',cb);
  28. }
  29. EntryHandler.prototype.onHudBuffListPush = function(cb){
  30. this.socket.on('connector.entryPush.hudBuffListPush',cb);
  31. }
  32. module.exports = EntryHandler;