From e41f374eb33e37ebb704fb76cfb4215755309a44 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 14 Nov 2017 16:57:16 +0900 Subject: [PATCH] ing --- subscribe/subscriber_handler.go | 13 +++++++++++++ subscribe/subscriber_handlers.go | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 subscribe/subscriber_handler.go diff --git a/subscribe/subscriber_handler.go b/subscribe/subscriber_handler.go new file mode 100644 index 0000000..f54cc8c --- /dev/null +++ b/subscribe/subscriber_handler.go @@ -0,0 +1,13 @@ +package subscribe + +import ( + cwf "git.loafle.net/commons_go/websocket_fasthttp" + oos "git.loafle.net/overflow/overflow_subscriber" +) + +type SubscriberHandler interface { + oos.SubscriberHandler + + GetSocket(id string) cwf.Socket + GetSockets() map[string]cwf.Socket +} diff --git a/subscribe/subscriber_handlers.go b/subscribe/subscriber_handlers.go index e028895..d8c2efd 100644 --- a/subscribe/subscriber_handlers.go +++ b/subscribe/subscriber_handlers.go @@ -14,6 +14,14 @@ type SubscriberHandlers struct { ServletHandler servlet.ServletHandler } +func (sh *SubscriberHandlers) GetSocket(id string) cwf.Socket { + return sh.ServletHandler.GetSocket(id) +} + +func (sh *SubscriberHandlers) GetSockets() map[string]cwf.Socket { + return sh.ServletHandler.GetSockets() +} + func (sh *SubscriberHandlers) Validate() { sh.SubscriberHandlers.Validate()