From 6dc7895947a3f04e6916bf72e4e7211f9bc22afb Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 27 Oct 2017 16:38:35 +0900 Subject: [PATCH] ing --- client.go | 6 ++++++ server.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/client.go b/client.go index c91709d..e4db5fd 100644 --- a/client.go +++ b/client.go @@ -13,6 +13,8 @@ import ( type Client interface { Start() error Stop() + + GetClientHandler() ClientHandler } func NewClient(ch ClientHandler) Client { @@ -31,6 +33,10 @@ type client struct { stopWg sync.WaitGroup } +func (c *client) GetClientHandler() ClientHandler { + return c.clientHandler +} + func (c *client) Start() error { if nil == c.clientHandler { panic("Client: client handler must be specified.") diff --git a/server.go b/server.go index dbec47a..91ad2ce 100644 --- a/server.go +++ b/server.go @@ -15,6 +15,8 @@ type Server interface { Start() error Stop() Serve() error + + GetServerHandler() ServerHandler } func NewServer(sh ServerHandler) Server { @@ -35,6 +37,10 @@ type server struct { stopWg sync.WaitGroup } +func (s *server) GetServerHandler() ServerHandler { + return s.serverHandler +} + func (s *server) Start() error { if nil == s.serverHandler { panic("Server: server handler must be specified.")