diff --git a/client/socket.go b/client/socket.go index 6c0a125..5ea589f 100644 --- a/client/socket.go +++ b/client/socket.go @@ -19,3 +19,9 @@ func (s Socket) EmitSocketEventDataReward(p model.PayloadEmitSocketEvent) error _, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p)) return err } + +// EmitEventToUser ... +func (s Socket) EmitEventToUser(p model.PayloadEmitSocketEvent) error { + _, err := natsio.GetServer().Request(subject.Socket.EmitEventToUser, toBytes(p)) + return err +} diff --git a/subject/socket.go b/subject/socket.go index dae77c1..7a51789 100644 --- a/subject/socket.go +++ b/subject/socket.go @@ -9,6 +9,8 @@ func getSocketValue(val string) string { // Socket ... var Socket = struct { EmitEventReward string + EmitEventToUser string }{ EmitEventReward: getSocketValue("emit_event_reward"), + EmitEventToUser: "send_message_to_socket", }