소스 검색

调整chat和ws

dcsunny 3 년 전
부모
커밋
8e601d2496
9개의 변경된 파일579개의 추가작업 그리고 104개의 파일을 삭제
  1. 227 58
      api/chat/chat.pb.go
  2. 16 0
      api/chat/chat.proto
  3. 36 0
      api/chat/chat_grpc.pb.go
  4. 215 46
      api/websocket/websocket.pb.go
  5. 16 0
      api/websocket/websocket.proto
  6. 36 0
      api/websocket/websocket_grpc.pb.go
  7. 13 0
      client/chat.go
  8. 10 0
      js/api/chat/chat_pb.ts
  9. 10 0
      js/api/websocket/websocket_pb.ts

+ 227 - 58
api/chat/chat.pb.go

@@ -21,6 +21,131 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+type ReceiveRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Method       string `protobuf:"bytes,1,opt,name=method,proto3" json:"method"`
+	Data         []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
+	Id           string `protobuf:"bytes,3,opt,name=id,proto3" json:"id"`
+	WebsocketTag string `protobuf:"bytes,4,opt,name=websocketTag,proto3" json:"websocketTag"`
+	PersonType   string `protobuf:"bytes,5,opt,name=personType,proto3" json:"personType"`
+	PersonId     string `protobuf:"bytes,6,opt,name=personId,proto3" json:"personId"`
+}
+
+func (x *ReceiveRequest) Reset() {
+	*x = ReceiveRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_chat_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReceiveRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReceiveRequest) ProtoMessage() {}
+
+func (x *ReceiveRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_chat_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.
+func (*ReceiveRequest) Descriptor() ([]byte, []int) {
+	return file_chat_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ReceiveRequest) GetMethod() string {
+	if x != nil {
+		return x.Method
+	}
+	return ""
+}
+
+func (x *ReceiveRequest) GetData() []byte {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+func (x *ReceiveRequest) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *ReceiveRequest) GetWebsocketTag() string {
+	if x != nil {
+		return x.WebsocketTag
+	}
+	return ""
+}
+
+func (x *ReceiveRequest) GetPersonType() string {
+	if x != nil {
+		return x.PersonType
+	}
+	return ""
+}
+
+func (x *ReceiveRequest) GetPersonId() string {
+	if x != nil {
+		return x.PersonId
+	}
+	return ""
+}
+
+type ReceiveReply struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+}
+
+func (x *ReceiveReply) Reset() {
+	*x = ReceiveReply{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_chat_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ReceiveReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReceiveReply) ProtoMessage() {}
+
+func (x *ReceiveReply) ProtoReflect() protoreflect.Message {
+	mi := &file_chat_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReceiveReply.ProtoReflect.Descriptor instead.
+func (*ReceiveReply) Descriptor() ([]byte, []int) {
+	return file_chat_proto_rawDescGZIP(), []int{1}
+}
+
 type CheckUserPartnerIsRelationshipReply struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -33,7 +158,7 @@ type CheckUserPartnerIsRelationshipReply struct {
 func (x *CheckUserPartnerIsRelationshipReply) Reset() {
 	*x = CheckUserPartnerIsRelationshipReply{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_chat_proto_msgTypes[0]
+		mi := &file_chat_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -46,7 +171,7 @@ func (x *CheckUserPartnerIsRelationshipReply) String() string {
 func (*CheckUserPartnerIsRelationshipReply) ProtoMessage() {}
 
 func (x *CheckUserPartnerIsRelationshipReply) ProtoReflect() protoreflect.Message {
-	mi := &file_chat_proto_msgTypes[0]
+	mi := &file_chat_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -59,7 +184,7 @@ func (x *CheckUserPartnerIsRelationshipReply) ProtoReflect() protoreflect.Messag
 
 // Deprecated: Use CheckUserPartnerIsRelationshipReply.ProtoReflect.Descriptor instead.
 func (*CheckUserPartnerIsRelationshipReply) Descriptor() ([]byte, []int) {
-	return file_chat_proto_rawDescGZIP(), []int{0}
+	return file_chat_proto_rawDescGZIP(), []int{2}
 }
 
 func (x *CheckUserPartnerIsRelationshipReply) GetIsBuildRelationship() bool {
@@ -87,7 +212,7 @@ type CreateUserPartnerIsRelationshipReply struct {
 func (x *CreateUserPartnerIsRelationshipReply) Reset() {
 	*x = CreateUserPartnerIsRelationshipReply{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_chat_proto_msgTypes[1]
+		mi := &file_chat_proto_msgTypes[3]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -100,7 +225,7 @@ func (x *CreateUserPartnerIsRelationshipReply) String() string {
 func (*CreateUserPartnerIsRelationshipReply) ProtoMessage() {}
 
 func (x *CreateUserPartnerIsRelationshipReply) ProtoReflect() protoreflect.Message {
-	mi := &file_chat_proto_msgTypes[1]
+	mi := &file_chat_proto_msgTypes[3]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -113,7 +238,7 @@ func (x *CreateUserPartnerIsRelationshipReply) ProtoReflect() protoreflect.Messa
 
 // Deprecated: Use CreateUserPartnerIsRelationshipReply.ProtoReflect.Descriptor instead.
 func (*CreateUserPartnerIsRelationshipReply) Descriptor() ([]byte, []int) {
-	return file_chat_proto_rawDescGZIP(), []int{1}
+	return file_chat_proto_rawDescGZIP(), []int{3}
 }
 
 func (x *CreateUserPartnerIsRelationshipReply) GetRoomId() int64 {
@@ -129,43 +254,59 @@ var file_chat_proto_rawDesc = []byte{
 	0x0a, 0x0a, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x70,
 	0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x17, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
 	0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
-	0x6f, 0x0a, 0x23, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74,
-	0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69,
-	0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x69, 0x73, 0x42, 0x75, 0x69, 0x6c,
-	0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d,
-	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
-	0x22, 0x3e, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61,
-	0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
-	0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d,
-	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
-	0x32, 0xd1, 0x02, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x72, 0x0a, 0x1e, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52,
-	0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x21, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6e, 0x64,
-	0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2d,
-	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
-	0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x74, 0x0a,
-	0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e,
+	0xac, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e,
+	0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22,
+	0x0a, 0x0c, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x67, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54,
+	0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x0e,
+	0x0a, 0x0c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x6f,
+	0x0a, 0x23, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e,
 	0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70,
-	0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73,
-	0x65, 0x72, 0x41, 0x6e, 0x64, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61,
-	0x72, 0x61, 0x6d, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43,
-	0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
-	0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x12, 0x5f, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e,
-	0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67,
-	0x65, 0x41, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f,
-	0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x70, 0x6c, 0x79, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74,
-	0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63,
-	0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x3b, 0x63,
-	0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x69, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64,
+	0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22,
+	0x3e, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72,
+	0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68,
+	0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x32,
+	0x90, 0x03, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x72, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63,
+	0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65,
+	0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x50,
+	0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2d, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73,
+	0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x74, 0x0a, 0x1f,
+	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
+	0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12,
+	0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65,
+	0x72, 0x41, 0x6e, 0x64, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61, 0x72,
+	0x61, 0x6d, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x72,
+	0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49,
+	0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70,
+	0x6c, 0x79, 0x12, 0x5f, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
+	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65,
+	0x41, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e,
+	0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x70, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x18,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
+	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
+	0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x22, 0x00, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x50, 0x01,
+	0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d,
+	0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x3b, 0x63, 0x68, 0x61,
+	0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -180,23 +321,27 @@ func file_chat_proto_rawDescGZIP() []byte {
 	return file_chat_proto_rawDescData
 }
 
-var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
 var file_chat_proto_goTypes = []interface{}{
-	(*CheckUserPartnerIsRelationshipReply)(nil),  // 0: api.chat.CheckUserPartnerIsRelationshipReply
-	(*CreateUserPartnerIsRelationshipReply)(nil), // 1: api.chat.CreateUserPartnerIsRelationshipReply
-	(*common.UserAndPartnerIdParam)(nil),         // 2: api.common.UserAndPartnerIdParam
-	(*common.ListPageAndPersonRequest)(nil),      // 3: api.common.ListPageAndPersonRequest
-	(*common.OnlinePersonListReply)(nil),         // 4: api.common.OnlinePersonListReply
+	(*ReceiveRequest)(nil),                       // 0: api.chat.ReceiveRequest
+	(*ReceiveReply)(nil),                         // 1: api.chat.ReceiveReply
+	(*CheckUserPartnerIsRelationshipReply)(nil),  // 2: api.chat.CheckUserPartnerIsRelationshipReply
+	(*CreateUserPartnerIsRelationshipReply)(nil), // 3: api.chat.CreateUserPartnerIsRelationshipReply
+	(*common.UserAndPartnerIdParam)(nil),         // 4: api.common.UserAndPartnerIdParam
+	(*common.ListPageAndPersonRequest)(nil),      // 5: api.common.ListPageAndPersonRequest
+	(*common.OnlinePersonListReply)(nil),         // 6: api.common.OnlinePersonListReply
 }
 var file_chat_proto_depIdxs = []int32{
-	2, // 0: api.chat.Chat.CheckUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
-	2, // 1: api.chat.Chat.CreateUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
-	3, // 2: api.chat.Chat.FindOnlinePersonList:input_type -> api.common.ListPageAndPersonRequest
-	0, // 3: api.chat.Chat.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
-	1, // 4: api.chat.Chat.CreateUserPartnerIsRelationship:output_type -> api.chat.CreateUserPartnerIsRelationshipReply
-	4, // 5: api.chat.Chat.FindOnlinePersonList:output_type -> api.common.OnlinePersonListReply
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] is the sub-list for method input_type
+	4, // 0: api.chat.Chat.CheckUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
+	4, // 1: api.chat.Chat.CreateUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
+	5, // 2: api.chat.Chat.FindOnlinePersonList:input_type -> api.common.ListPageAndPersonRequest
+	0, // 3: api.chat.Chat.Receive:input_type -> api.chat.ReceiveRequest
+	2, // 4: api.chat.Chat.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
+	3, // 5: api.chat.Chat.CreateUserPartnerIsRelationship:output_type -> api.chat.CreateUserPartnerIsRelationshipReply
+	6, // 6: api.chat.Chat.FindOnlinePersonList:output_type -> api.common.OnlinePersonListReply
+	1, // 7: api.chat.Chat.Receive:output_type -> api.chat.ReceiveReply
+	4, // [4:8] is the sub-list for method output_type
+	0, // [0:4] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for field type_name
@@ -209,7 +354,7 @@ func file_chat_proto_init() {
 	}
 	if !protoimpl.UnsafeEnabled {
 		file_chat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*CheckUserPartnerIsRelationshipReply); i {
+			switch v := v.(*ReceiveRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -221,6 +366,30 @@ func file_chat_proto_init() {
 			}
 		}
 		file_chat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ReceiveReply); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_chat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CheckUserPartnerIsRelationshipReply); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_chat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*CreateUserPartnerIsRelationshipReply); i {
 			case 0:
 				return &v.state
@@ -239,7 +408,7 @@ func file_chat_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_chat_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   2,
+			NumMessages:   4,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 16 - 0
api/chat/chat.proto

@@ -18,6 +18,22 @@ service Chat {
   rpc CreateUserPartnerIsRelationship (common.UserAndPartnerIdParam) returns (CreateUserPartnerIsRelationshipReply);
   // 查询在线人的列表
   rpc FindOnlinePersonList (common.ListPageAndPersonRequest) returns (common.OnlinePersonListReply);
+
+  rpc Receive (ReceiveRequest) returns (ReceiveReply){};
+
+}
+
+message ReceiveRequest{
+  string method = 1;
+  bytes data = 2;
+  string id = 3;
+  string websocketTag = 4;
+  string personType = 5;
+  string personId = 6;
+}
+
+message ReceiveReply{
+
 }
 
 message CheckUserPartnerIsRelationshipReply{

+ 36 - 0
api/chat/chat_grpc.pb.go

@@ -25,6 +25,7 @@ type ChatClient interface {
 	CreateUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error)
 	// 查询在线人的列表
 	FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error)
+	Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error)
 }
 
 type chatClient struct {
@@ -62,6 +63,15 @@ func (c *chatClient) FindOnlinePersonList(ctx context.Context, in *common.ListPa
 	return out, nil
 }
 
+func (c *chatClient) Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error) {
+	out := new(ReceiveReply)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/Receive", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ChatServer is the server API for Chat service.
 // All implementations must embed UnimplementedChatServer
 // for forward compatibility
@@ -72,6 +82,7 @@ type ChatServer interface {
 	CreateUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CreateUserPartnerIsRelationshipReply, error)
 	// 查询在线人的列表
 	FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error)
+	Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error)
 	mustEmbedUnimplementedChatServer()
 }
 
@@ -88,6 +99,9 @@ func (UnimplementedChatServer) CreateUserPartnerIsRelationship(context.Context,
 func (UnimplementedChatServer) FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonList not implemented")
 }
+func (UnimplementedChatServer) Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Receive not implemented")
+}
 func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
 
 // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
@@ -155,6 +169,24 @@ func _Chat_FindOnlinePersonList_Handler(srv interface{}, ctx context.Context, de
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Chat_Receive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ReceiveRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).Receive(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/Receive",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).Receive(ctx, req.(*ReceiveRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -174,6 +206,10 @@ var Chat_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindOnlinePersonList",
 			Handler:    _Chat_FindOnlinePersonList_Handler,
 		},
+		{
+			MethodName: "Receive",
+			Handler:    _Chat_Receive_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "chat.proto",

+ 215 - 46
api/websocket/websocket.pb.go

@@ -21,6 +21,131 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+type SendMsgRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id           string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
+	Method       string `protobuf:"bytes,2,opt,name=method,proto3" json:"method"`
+	Data         []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
+	Code         int32  `protobuf:"varint,4,opt,name=code,proto3" json:"code"`
+	Message      string `protobuf:"bytes,5,opt,name=message,proto3" json:"message"`
+	WebsocketTag string `protobuf:"bytes,6,opt,name=websocketTag,proto3" json:"websocketTag"`
+}
+
+func (x *SendMsgRequest) Reset() {
+	*x = SendMsgRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_websocket_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SendMsgRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SendMsgRequest) ProtoMessage() {}
+
+func (x *SendMsgRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_websocket_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SendMsgRequest.ProtoReflect.Descriptor instead.
+func (*SendMsgRequest) Descriptor() ([]byte, []int) {
+	return file_websocket_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SendMsgRequest) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *SendMsgRequest) GetMethod() string {
+	if x != nil {
+		return x.Method
+	}
+	return ""
+}
+
+func (x *SendMsgRequest) GetData() []byte {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+func (x *SendMsgRequest) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *SendMsgRequest) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+func (x *SendMsgRequest) GetWebsocketTag() string {
+	if x != nil {
+		return x.WebsocketTag
+	}
+	return ""
+}
+
+type SendMsgReply struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+}
+
+func (x *SendMsgReply) Reset() {
+	*x = SendMsgReply{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_websocket_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SendMsgReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SendMsgReply) ProtoMessage() {}
+
+func (x *SendMsgReply) ProtoReflect() protoreflect.Message {
+	mi := &file_websocket_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SendMsgReply.ProtoReflect.Descriptor instead.
+func (*SendMsgReply) Descriptor() ([]byte, []int) {
+	return file_websocket_proto_rawDescGZIP(), []int{1}
+}
+
 type FindOnlinePersonReply struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -30,7 +155,7 @@ type FindOnlinePersonReply struct {
 func (x *FindOnlinePersonReply) Reset() {
 	*x = FindOnlinePersonReply{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_websocket_proto_msgTypes[0]
+		mi := &file_websocket_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -43,7 +168,7 @@ func (x *FindOnlinePersonReply) String() string {
 func (*FindOnlinePersonReply) ProtoMessage() {}
 
 func (x *FindOnlinePersonReply) ProtoReflect() protoreflect.Message {
-	mi := &file_websocket_proto_msgTypes[0]
+	mi := &file_websocket_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -56,7 +181,7 @@ func (x *FindOnlinePersonReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use FindOnlinePersonReply.ProtoReflect.Descriptor instead.
 func (*FindOnlinePersonReply) Descriptor() ([]byte, []int) {
-	return file_websocket_proto_rawDescGZIP(), []int{0}
+	return file_websocket_proto_rawDescGZIP(), []int{2}
 }
 
 type TransmitMessageRequest struct {
@@ -68,7 +193,7 @@ type TransmitMessageRequest struct {
 func (x *TransmitMessageRequest) Reset() {
 	*x = TransmitMessageRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_websocket_proto_msgTypes[1]
+		mi := &file_websocket_proto_msgTypes[3]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -81,7 +206,7 @@ func (x *TransmitMessageRequest) String() string {
 func (*TransmitMessageRequest) ProtoMessage() {}
 
 func (x *TransmitMessageRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_websocket_proto_msgTypes[1]
+	mi := &file_websocket_proto_msgTypes[3]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -94,7 +219,7 @@ func (x *TransmitMessageRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use TransmitMessageRequest.ProtoReflect.Descriptor instead.
 func (*TransmitMessageRequest) Descriptor() ([]byte, []int) {
-	return file_websocket_proto_rawDescGZIP(), []int{1}
+	return file_websocket_proto_rawDescGZIP(), []int{3}
 }
 
 type TransmitMessageReply struct {
@@ -106,7 +231,7 @@ type TransmitMessageReply struct {
 func (x *TransmitMessageReply) Reset() {
 	*x = TransmitMessageReply{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_websocket_proto_msgTypes[2]
+		mi := &file_websocket_proto_msgTypes[4]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -119,7 +244,7 @@ func (x *TransmitMessageReply) String() string {
 func (*TransmitMessageReply) ProtoMessage() {}
 
 func (x *TransmitMessageReply) ProtoReflect() protoreflect.Message {
-	mi := &file_websocket_proto_msgTypes[2]
+	mi := &file_websocket_proto_msgTypes[4]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -132,7 +257,7 @@ func (x *TransmitMessageReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use TransmitMessageReply.ProtoReflect.Descriptor instead.
 func (*TransmitMessageReply) Descriptor() ([]byte, []int) {
-	return file_websocket_proto_rawDescGZIP(), []int{2}
+	return file_websocket_proto_rawDescGZIP(), []int{4}
 }
 
 var File_websocket_proto protoreflect.FileDescriptor
@@ -141,29 +266,45 @@ var file_websocket_proto_rawDesc = []byte{
 	0x0a, 0x0f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
 	0x6f, 0x12, 0x0d, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
 	0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
-	0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a,
-	0x15, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
-	0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d,
-	0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x22, 0x16, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xbc, 0x01, 0x0a, 0x09, 0x57, 0x65, 0x62,
-	0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x5d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d,
-	0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d,
-	0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
-	0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c,
-	0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
-	0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
-	0x79, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
-	0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73,
-	0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x4c, 0x0a, 0x0d, 0x61, 0x70, 0x69, 0x2e, 0x77,
-	0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x2e,
-	0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
-	0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70,
-	0x69, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3b, 0x77, 0x65, 0x62, 0x73,
-	0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x01,
+	0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
+	0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65,
+	0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0c, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x67, 0x22, 0x0e,
+	0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17,
+	0x0a, 0x15, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73,
+	0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73,
+	0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x22, 0x16, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0x85, 0x02, 0x0a, 0x09, 0x57, 0x65,
+	0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x5d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73,
+	0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
+	0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+	0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e,
+	0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
+	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
+	0x74, 0x79, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
+	0x65, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72,
+	0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64,
+	0x4d, 0x73, 0x67, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63,
+	0x6b, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
+	0x65, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
+	0x00, 0x42, 0x4c, 0x0a, 0x0d, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
+	0x65, 0x74, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e,
+	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x65, 0x62, 0x73,
+	0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3b, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -178,20 +319,24 @@ func file_websocket_proto_rawDescGZIP() []byte {
 	return file_websocket_proto_rawDescData
 }
 
-var file_websocket_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_websocket_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_websocket_proto_goTypes = []interface{}{
-	(*FindOnlinePersonReply)(nil),  // 0: api.websocket.FindOnlinePersonReply
-	(*TransmitMessageRequest)(nil), // 1: api.websocket.TransmitMessageRequest
-	(*TransmitMessageReply)(nil),   // 2: api.websocket.TransmitMessageReply
-	(*emptypb.Empty)(nil),          // 3: google.protobuf.Empty
+	(*SendMsgRequest)(nil),         // 0: api.websocket.SendMsgRequest
+	(*SendMsgReply)(nil),           // 1: api.websocket.SendMsgReply
+	(*FindOnlinePersonReply)(nil),  // 2: api.websocket.FindOnlinePersonReply
+	(*TransmitMessageRequest)(nil), // 3: api.websocket.TransmitMessageRequest
+	(*TransmitMessageReply)(nil),   // 4: api.websocket.TransmitMessageReply
+	(*emptypb.Empty)(nil),          // 5: google.protobuf.Empty
 }
 var file_websocket_proto_depIdxs = []int32{
-	1, // 0: api.websocket.Websocket.TransmitMessage:input_type -> api.websocket.TransmitMessageRequest
-	3, // 1: api.websocket.Websocket.FindOnlinePerson:input_type -> google.protobuf.Empty
-	2, // 2: api.websocket.Websocket.TransmitMessage:output_type -> api.websocket.TransmitMessageReply
-	0, // 3: api.websocket.Websocket.FindOnlinePerson:output_type -> api.websocket.FindOnlinePersonReply
-	2, // [2:4] is the sub-list for method output_type
-	0, // [0:2] is the sub-list for method input_type
+	3, // 0: api.websocket.Websocket.TransmitMessage:input_type -> api.websocket.TransmitMessageRequest
+	5, // 1: api.websocket.Websocket.FindOnlinePerson:input_type -> google.protobuf.Empty
+	0, // 2: api.websocket.Websocket.SendMsg:input_type -> api.websocket.SendMsgRequest
+	4, // 3: api.websocket.Websocket.TransmitMessage:output_type -> api.websocket.TransmitMessageReply
+	2, // 4: api.websocket.Websocket.FindOnlinePerson:output_type -> api.websocket.FindOnlinePersonReply
+	1, // 5: api.websocket.Websocket.SendMsg:output_type -> api.websocket.SendMsgReply
+	3, // [3:6] is the sub-list for method output_type
+	0, // [0:3] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for field type_name
@@ -204,7 +349,7 @@ func file_websocket_proto_init() {
 	}
 	if !protoimpl.UnsafeEnabled {
 		file_websocket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*FindOnlinePersonReply); i {
+			switch v := v.(*SendMsgRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -216,7 +361,7 @@ func file_websocket_proto_init() {
 			}
 		}
 		file_websocket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*TransmitMessageRequest); i {
+			switch v := v.(*SendMsgReply); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -228,6 +373,30 @@ func file_websocket_proto_init() {
 			}
 		}
 		file_websocket_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FindOnlinePersonReply); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_websocket_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TransmitMessageRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_websocket_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*TransmitMessageReply); i {
 			case 0:
 				return &v.state
@@ -246,7 +415,7 @@ func file_websocket_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_websocket_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   3,
+			NumMessages:   5,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 16 - 0
api/websocket/websocket.proto

@@ -13,6 +13,22 @@ option java_package = "api.websocket";
 service Websocket {
   rpc TransmitMessage (TransmitMessageRequest) returns (TransmitMessageReply);
   rpc FindOnlinePerson (google.protobuf.Empty) returns (FindOnlinePersonReply);
+
+  rpc SendMsg (SendMsgRequest) returns (SendMsgReply){};
+
+}
+
+message SendMsgRequest{
+  string id = 1;
+  string method = 2;
+  bytes data = 3;
+  int32 code = 4;
+  string message = 5;
+  string websocketTag = 6;
+}
+
+message SendMsgReply{
+
 }
 
 message FindOnlinePersonReply{

+ 36 - 0
api/websocket/websocket_grpc.pb.go

@@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7
 type WebsocketClient interface {
 	TransmitMessage(ctx context.Context, in *TransmitMessageRequest, opts ...grpc.CallOption) (*TransmitMessageReply, error)
 	FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error)
+	SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error)
 }
 
 type websocketClient struct {
@@ -49,12 +50,22 @@ func (c *websocketClient) FindOnlinePerson(ctx context.Context, in *emptypb.Empt
 	return out, nil
 }
 
+func (c *websocketClient) SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error) {
+	out := new(SendMsgReply)
+	err := c.cc.Invoke(ctx, "/api.websocket.Websocket/SendMsg", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // WebsocketServer is the server API for Websocket service.
 // All implementations must embed UnimplementedWebsocketServer
 // for forward compatibility
 type WebsocketServer interface {
 	TransmitMessage(context.Context, *TransmitMessageRequest) (*TransmitMessageReply, error)
 	FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error)
+	SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error)
 	mustEmbedUnimplementedWebsocketServer()
 }
 
@@ -68,6 +79,9 @@ func (UnimplementedWebsocketServer) TransmitMessage(context.Context, *TransmitMe
 func (UnimplementedWebsocketServer) FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePerson not implemented")
 }
+func (UnimplementedWebsocketServer) SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented")
+}
 func (UnimplementedWebsocketServer) mustEmbedUnimplementedWebsocketServer() {}
 
 // UnsafeWebsocketServer may be embedded to opt out of forward compatibility for this service.
@@ -117,6 +131,24 @@ func _Websocket_FindOnlinePerson_Handler(srv interface{}, ctx context.Context, d
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Websocket_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SendMsgRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(WebsocketServer).SendMsg(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.websocket.Websocket/SendMsg",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WebsocketServer).SendMsg(ctx, req.(*SendMsgRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Websocket_ServiceDesc is the grpc.ServiceDesc for Websocket service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -132,6 +164,10 @@ var Websocket_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindOnlinePerson",
 			Handler:    _Websocket_FindOnlinePerson_Handler,
 		},
+		{
+			MethodName: "SendMsg",
+			Handler:    _Websocket_SendMsg_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "websocket.proto",

+ 13 - 0
client/chat.go

@@ -3,6 +3,7 @@ package client
 import (
 	"git.ikuban.com/server/kratos-nacos/registry"
 	"git.ikuban.com/server/pw-protobuf/api/chat"
+	"git.ikuban.com/server/pw-protobuf/api/websocket"
 	"github.com/go-kratos/kratos/v2/log"
 )
 
@@ -17,3 +18,15 @@ func NewChatClient(r *registry.Registry, logger log.Logger) chat.ChatClient {
 	client := chat.NewChatClient(conn)
 	return client
 }
+
+func NewWebsocketClient(r *registry.Registry, logger log.Logger) websocket.WebsocketClient {
+	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-ws")
+	if err != nil {
+		panic(err)
+	}
+	if conn == nil {
+		return nil
+	}
+	client := websocket.NewWebsocketClient(conn)
+	return client
+}

+ 10 - 0
js/api/chat/chat_pb.ts

@@ -1,3 +1,13 @@
+export interface ReceiveRequest{
+    method?:string;
+    data?:any;
+    id?:string;
+    websocketTag?:string;
+    personType?:string;
+    personId?:string;
+}
+export interface ReceiveReply{
+}
 export interface CheckUserPartnerIsRelationshipReply{
     isBuildRelationship?:boolean;
     roomId?:number;

+ 10 - 0
js/api/websocket/websocket_pb.ts

@@ -1,3 +1,13 @@
+export interface SendMsgRequest{
+    id?:string;
+    method?:string;
+    data?:any;
+    code?:number;
+    message?:string;
+    websocketTag?:string;
+}
+export interface SendMsgReply{
+}
 export interface FindOnlinePersonReply{
 }
 export interface TransmitMessageRequest{