채팅을 따로 분리해 속도 제한 없이: 방 채팅·마피아·라이어·그림 맞히기(그리기 전) 채팅의 줄 간격 제한(chat-pace)과 브라우저 대기열을 없애 치는 대로 바로 보냄. 서버 연결당 공용 한도(초당 20개)를 채팅·입력 중 신호가 같이 써서 빠르게 치면 15번째 줄부터 조용히 사라지던 문제도: 채팅은 별도 한도(초당 50, 최대 200, 매크로 도배 방지용)로 분리. 게임 채팅은 보내는 동안 게임 버튼을 잠그지 않음(pending 미설정)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -258,12 +258,11 @@ describe('차례대로 설명 (§5.2)', () => {
|
||||
expect(reject(s, 'P0', { type: 'chat', text: '안녕' })).toContain('확인하는 중');
|
||||
s = until(s, 'discussion');
|
||||
const t = at(s);
|
||||
// A quick run of lines goes through at once; only a flood is refused.
|
||||
for (let i = 0; i < 6; i++) s = act(s, 'P1', { type: 'chat', text: `누구지 ${i}` }, t);
|
||||
expect(reject(s, 'P1', { type: 'chat', text: '또' }, t + 100)).toBe('조금 천천히 보내 주세요.');
|
||||
// No pace limit: any number of lines at the same moment all go through.
|
||||
for (let i = 0; i < 20; i++) s = act(s, 'P1', { type: 'chat', text: `누구지 ${i}` }, t);
|
||||
s = until(s, 'vote');
|
||||
s = act(s, 'P2', { type: 'chat', text: '투표해요' });
|
||||
expect(s.chat.map((m) => m.text)).toEqual(['누구지 0', '누구지 1', '누구지 2', '누구지 3', '누구지 4', '누구지 5', '투표해요']);
|
||||
expect(s.chat.map((m) => m.text)).toEqual([...Array.from({ length: 20 }, (_, i) => `누구지 ${i}`), '투표해요']);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user