Skip to content

KimWang906/pp_game_server

Repository files navigation

BSSM Ping Pong Server

Client Test

Register

grpcurl -plaintext -import-path ./proto -proto auth.proto -d \
'{
    "username": "KimWang906",
    "password": "test1234",
    "student_id": "2022028"
}' \
'[::1]:50051' auth.Auth/Register

Login

grpcurl -plaintext -import-path ./proto -proto auth.proto -d \
'{
    "username": "KimWang906",
    "password": "test1234"
}' \
'[::1]:50051' auth.Auth/Login

Create Room

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' -d \
'{
    "room_name": "Testing Room!",
    "max_size": "DOUBLE_PLAYERS",
    "owner_name": "KimWang906"
}' \
'[::1]:50051' room.RoomManager/CreateRoom

Destroy Room

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' -d \
'{
    "id": 1
}' \
'[::1]:50051' room.RoomManager/DeleteRoom

Room List

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' '[::1]:50051' room.RoomManager/ListRooms

Watching Room

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' -d \
'{
    "id": 1
}' \
'[::1]:50051' room.RoomManager/WatchRoomInfo

Join Room

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' -d \
'{
    "id": 1
}' \
'[::1]:50051' room.RoomUserManager/JoinRoom

Leave Room

grpcurl -plaintext -import-path ./proto -proto room.proto \
-H 'x-authorization: <access_token>' -d \
'{}' '[::1]:50051' room.RoomUserManager/LeaveRoom

About

Ping Pong Game Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages