public BotTestServer(int serverPort, int wolfCount, int serverSideBotsCount = 0) { _test = new ToonKnifeTest(); ToonKnifeTest.current = _test; _test.UserCount = wolfCount * 2; //TODO как-то надо протестить много каток подряд с одного лкиента без переподключения _test.Step_AllRabbitUsers_SendFail.overrideValueToSuccess = _test.RabbitTotalCount; _test.Step_AllWolfUsers_SendWin.overrideValueToSuccess = _test.WolfTotalCount; _server = new Server.Server(); _server.UserFightQueue.UserEnqueue += UserFightQueue_UserEnqueue; _server.FightList.FightCreated += FightList_FightCreated; // scs _scsServer = new ScsService.Server.ScsService(serverPort); _scsServer.OnUserLogin += ScsServer_OnUserLogin; _scsServer.OnUserDisconnected += ScsServer_OnUserDisconnected; _scsServer.Start(); for (int i = 0; i < serverSideBotsCount; i++) { } }
public ServerAdapter(int serverPort) { _toonKnifeServer = new Server(); _scsServer = new ScsService.Server.ScsService(5500); _scsServer.OnUserLogin += ScsServer_OnUserLogin; _scsServer.OnUserDisconnected += ScsServer_OnUserDisconnected; }
public TestServer(int tcpPort) { _users = new Dictionary <IMessenger, User>(); scsServer = new ScsService.Server.ScsService(ScsServiseTest.current.ServerPort); //scsServer.MsgReaders.RegisterMsgReader<TestMessage>(OnTestMessage); scsServer.OnUserLogin += ScsServer_OnUserLogin; scsServer.OnUserDisconnected += ScsServer_OnUserDisconnected; scsServer.Start(); }