-
20250530 개발 일지. 프로토버프 적용.개발일지/C# 채팅 프로그램 2025. 6. 18. 11:55728x90
점심쯤 옴
# 프로토버프
https://usingsystem.tistory.com/152
# 파일 링크
https://points.tistory.com/27
https://stackoverflow.com/questions/2593612/visual-studio-add-item-add-as-link-rather-than-just-add
-> (20250602) 파일 링크로 프로토콜 파일 추가 시 에러 발생하여 링크는 적용안함# 프로토버프 에러
프로토버프 실행 시 에러가 발생했는데 msgid를 정의하는 enum과 message 이름이 같을 경우 발생하는 에러이다
Protocol.proto:7:9: "S_CHAT" is already defined in "Protocol".
Protocol.proto:7:9: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "S_CHAT" must be unique within "Protocol", not just within "MsgId".
Protocol.proto:8:9: "C_CHAT" is already defined in "Protocol".
Protocol.proto:8:9: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "C_CHAT" must be unique within "Protocol", not just within "MsgId".# 프로토버프 에러 2
기존에 직접 작성한 패킷 시스템에서 protobuf로 변경하는 도중 해당 에러 발생
Google.Protobuf.InvalidProtocolBufferException: 'Message C_Chat doesn't provide the generated method that enables ParseContext-based parsing. You might need to regenerate the generated protobuf code.'
-> 클라 서버 똑같은 protocol 파일이 필요하므로 프로젝트에 추가할 때 링크를 추가해서 발생한 에러인것 같다. 그냥 파일을 복사하여 클라와 서버에 복사 붙여넣기 했더니 정상적으로 작동함728x90'개발일지 > C# 채팅 프로그램' 카테고리의 다른 글
20250603 개발일지. 소켓 서버 성능 테스트 진행. (0) 2025.06.19 20250602 개발 일지. 패킷 제너레이터 만들기. (0) 2025.06.19 20250529 개발일지. 버그 수정 진행. (0) 2025.06.18 20250528 개발일지. 버그 수정 진행. (0) 2025.06.18 20250527 개발일지. 소켓 관련 게시글 읽기 및 부하테스트 진행, 버그 발생. (0) 2025.06.16