|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603 |
- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
- """Client and server classes corresponding to protobuf-defined services."""
- import grpc
-
- import Message2Clients_pb2 as Message2Clients__pb2
- import Message2Server_pb2 as Message2Server__pb2
-
-
- class AvailableServiceStub(object):
- """Missing associated documentation comment in .proto file."""
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.TryConnection = channel.unary_unary(
- '/protobuf.AvailableService/TryConnection',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.AddPlayer = channel.unary_stream(
- '/protobuf.AvailableService/AddPlayer',
- request_serializer=Message2Server__pb2.PlayerMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.MessageToClient.FromString,
- )
- self.Move = channel.unary_unary(
- '/protobuf.AvailableService/Move',
- request_serializer=Message2Server__pb2.MoveMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.MoveRes.FromString,
- )
- self.PickProp = channel.unary_unary(
- '/protobuf.AvailableService/PickProp',
- request_serializer=Message2Server__pb2.PickMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.UseProp = channel.unary_unary(
- '/protobuf.AvailableService/UseProp',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.UseSkill = channel.unary_unary(
- '/protobuf.AvailableService/UseSkill',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.SendMessage = channel.unary_unary(
- '/protobuf.AvailableService/SendMessage',
- request_serializer=Message2Server__pb2.SendMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.GetMessage = channel.unary_stream(
- '/protobuf.AvailableService/GetMessage',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.MsgRes.FromString,
- )
- self.StartFixMachine = channel.unary_unary(
- '/protobuf.AvailableService/StartFixMachine',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.EndFixMachine = channel.unary_unary(
- '/protobuf.AvailableService/EndFixMachine',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.StartSaveHuman = channel.unary_unary(
- '/protobuf.AvailableService/StartSaveHuman',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.EndSaveHuman = channel.unary_unary(
- '/protobuf.AvailableService/EndSaveHuman',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.Attack = channel.unary_unary(
- '/protobuf.AvailableService/Attack',
- request_serializer=Message2Server__pb2.AttackMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.CarryHuman = channel.unary_unary(
- '/protobuf.AvailableService/CarryHuman',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.ReleaseHuman = channel.unary_unary(
- '/protobuf.AvailableService/ReleaseHuman',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.HangHuman = channel.unary_unary(
- '/protobuf.AvailableService/HangHuman',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
- self.Escape = channel.unary_unary(
- '/protobuf.AvailableService/Escape',
- request_serializer=Message2Server__pb2.IDMsg.SerializeToString,
- response_deserializer=Message2Clients__pb2.BoolRes.FromString,
- )
-
-
- class AvailableServiceServicer(object):
- """Missing associated documentation comment in .proto file."""
-
- def TryConnection(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def AddPlayer(self, request, context):
- """游戏开局调用一次的服务
- 连接上后等待游戏开始,server会定时通过该服务向所有client发送消息。
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def Move(self, request, context):
- """游戏过程中玩家执行操作的服务
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def PickProp(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def UseProp(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def UseSkill(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SendMessage(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def GetMessage(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def StartFixMachine(self, request, context):
- """开始修理机器
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def EndFixMachine(self, request, context):
- """主动停止修复
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def StartSaveHuman(self, request, context):
- """开始救人
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def EndSaveHuman(self, request, context):
- """主动停止救人
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def Attack(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def CarryHuman(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def ReleaseHuman(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def HangHuman(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def Escape(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
- def add_AvailableServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'TryConnection': grpc.unary_unary_rpc_method_handler(
- servicer.TryConnection,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'AddPlayer': grpc.unary_stream_rpc_method_handler(
- servicer.AddPlayer,
- request_deserializer=Message2Server__pb2.PlayerMsg.FromString,
- response_serializer=Message2Clients__pb2.MessageToClient.SerializeToString,
- ),
- 'Move': grpc.unary_unary_rpc_method_handler(
- servicer.Move,
- request_deserializer=Message2Server__pb2.MoveMsg.FromString,
- response_serializer=Message2Clients__pb2.MoveRes.SerializeToString,
- ),
- 'PickProp': grpc.unary_unary_rpc_method_handler(
- servicer.PickProp,
- request_deserializer=Message2Server__pb2.PickMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'UseProp': grpc.unary_unary_rpc_method_handler(
- servicer.UseProp,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'UseSkill': grpc.unary_unary_rpc_method_handler(
- servicer.UseSkill,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'SendMessage': grpc.unary_unary_rpc_method_handler(
- servicer.SendMessage,
- request_deserializer=Message2Server__pb2.SendMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'GetMessage': grpc.unary_stream_rpc_method_handler(
- servicer.GetMessage,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.MsgRes.SerializeToString,
- ),
- 'StartFixMachine': grpc.unary_unary_rpc_method_handler(
- servicer.StartFixMachine,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'EndFixMachine': grpc.unary_unary_rpc_method_handler(
- servicer.EndFixMachine,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'StartSaveHuman': grpc.unary_unary_rpc_method_handler(
- servicer.StartSaveHuman,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'EndSaveHuman': grpc.unary_unary_rpc_method_handler(
- servicer.EndSaveHuman,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'Attack': grpc.unary_unary_rpc_method_handler(
- servicer.Attack,
- request_deserializer=Message2Server__pb2.AttackMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'CarryHuman': grpc.unary_unary_rpc_method_handler(
- servicer.CarryHuman,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'ReleaseHuman': grpc.unary_unary_rpc_method_handler(
- servicer.ReleaseHuman,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'HangHuman': grpc.unary_unary_rpc_method_handler(
- servicer.HangHuman,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- 'Escape': grpc.unary_unary_rpc_method_handler(
- servicer.Escape,
- request_deserializer=Message2Server__pb2.IDMsg.FromString,
- response_serializer=Message2Clients__pb2.BoolRes.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'protobuf.AvailableService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
- # This class is part of an EXPERIMENTAL API.
-
-
- class AvailableService(object):
- """Missing associated documentation comment in .proto file."""
-
- @staticmethod
- def TryConnection(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/TryConnection',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def AddPlayer(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/protobuf.AvailableService/AddPlayer',
- Message2Server__pb2.PlayerMsg.SerializeToString,
- Message2Clients__pb2.MessageToClient.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def Move(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/Move',
- Message2Server__pb2.MoveMsg.SerializeToString,
- Message2Clients__pb2.MoveRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def PickProp(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/PickProp',
- Message2Server__pb2.PickMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def UseProp(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/UseProp',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def UseSkill(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/UseSkill',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SendMessage(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/SendMessage',
- Message2Server__pb2.SendMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def GetMessage(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/protobuf.AvailableService/GetMessage',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.MsgRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def StartFixMachine(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/StartFixMachine',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def EndFixMachine(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/EndFixMachine',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def StartSaveHuman(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/StartSaveHuman',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def EndSaveHuman(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/EndSaveHuman',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def Attack(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/Attack',
- Message2Server__pb2.AttackMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def CarryHuman(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/CarryHuman',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def ReleaseHuman(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/ReleaseHuman',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def HangHuman(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/HangHuman',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def Escape(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/protobuf.AvailableService/Escape',
- Message2Server__pb2.IDMsg.SerializeToString,
- Message2Clients__pb2.BoolRes.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|