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()