ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 20250612 개발 일지. 더미 클라이언트르를 사용한 패킷 테스트
    개발일지/C# 채팅 프로그램 2025. 6. 23. 13:04
    728x90

    오늘도 점심쯤 옴

    # 입장 패킷
    클라이언트가 방 입장 패킷을 보내 입장이 완료 처리가 되면 요청한 해당 방에 있는 유저, 로비에 있는 유저, 다른 방에 있는 유저 이렇게 3가지 그룹 중 해당 방에 있는 유저들과 로비에 있는 유저들에게만 입장 패킷을 보낸다.

    # 퇴장 패킷
    클라이언트가 방 퇴장 패킷을 보내 퇴장 완료 처리가 되면 요청한 해당 방에 있는 유저와 로비에 있는 유저에게 퇴장 패킷을 보내 클라이언트 방 목록의 일부를 갱신 시킨다.

    # 방 삭제 패킷
    클라이언트가 방 삭제 패킷을 보내 삭제 완료 처리가 되면 요청한 해당 방에 있는 유저와 로비에 있는 유저에게 방 삭제 패킷을 보내 클라이언트 방 목록의 일부를 갱신

     

    # 더미 클라이언트 테스트

    콘솔에서 키 입력으로 특정 패킷을 보낼 수 있도록 구현


    ## 클라이언트 1 cmd 콘솔 로그

    닉네임 변경, 방 생성, 채팅 보내기 테스트 진행


     Hello, Client!
    [TestSession_1] Connected to 10.34.221.15:7777

    Q Key Pressed. Sending C_SetNickname Messages...
    Enter your nickname:asdf1

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
     -> asdf1
    w
    W Key Pressed. Sending C_CreateRoom Messages...
    Enter Room Name:test1

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    C_CreateRoom Send Complete!
    d
    S Key Pressed. 패킷을 보내지 않고 현재 로비 유저 리스트 확인
    No users available in the lobby.

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    s
    S Key Pressed. 패킷을 보내지 않고 현재 룸 리스트 확인
    Available Rooms:
    [1]

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    f
    F Key Pressed. 패킷을 보내지 않고 현재 방 유저 리스트 확인
    Current Room:
    Users in Current Room:
    UserId: 0, Nickname:

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    C_CreateRoom Send Complete!
    1[2025-06-12 오전 8:22:39]: qweqwe
    C_CreateRoom Send Complete!
    a
    A Key Pressed. Sending C_LeaveRoom Messages...
    Input Message: weiowjfweoif

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    0[2025-06-12 오전 8:22:56]: weiowjfweoif
    1[2025-06-12 오전 8:23:07]: ewiweie


    ## 클라이언트 2
    Hello, Client!
    [TestSession_1] Connected to 10.34.221.15:7777

    Q Key Pressed. Sending C_SetNickname Messages...
    Enter your nickname:asdf2

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
     -> asdf2
    s
    S Key Pressed. 패킷을 보내지 않고 현재 룸 리스트 확인
    No rooms available.

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    e
    E Key Pressed. Sending C_RoomList Messages...

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    C_RoomList Send Complete!
    [1] test1
    s
    S Key Pressed. 패킷을 보내지 않고 현재 룸 리스트 확인
    Available Rooms:
    [1] test1

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    t
    T Key Pressed. Sending C_EnterRoom Messages...
    Enter Room Id:1

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    [test1] test1 입장
    UserId: 0, Nickname: asdf1
    UserId: 0, Nickname: asdf2
    a
    A Key Pressed. Sending C_LeaveRoom Messages...
    Input Message: qweqwe

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    1[2025-06-12 오전 8:22:39]: qweqwe
    0[2025-06-12 오전 8:22:56]: weiowjfweoif
    a
    A Key Pressed. Sending C_LeaveRoom Messages...
    Input Message: ewiweie

    Press Q to set nickname, W to create room, E to list rooms, Spacebar to send test messages, or Escape to exit.
    Press R to delete room, T to enter room, Y to delete current room, U to leave room.
    Press A to send chat message, S to check room list, D to check lobby user list, F to check current room user list.
    1[2025-06-12 오전 8:23:07]: ewiweie

     

    # 일지
    어느정도 기본 기능을 만든 것 같다. 이제 WPF를 사용한 클라이언트 작업에 착수할 예정이다.

    728x90
Designed by Tistory.