diff options
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,7 @@ | |||
1 | package main | 1 | package main |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "context" | ||
4 | "log" | 5 | "log" |
5 | "net" | 6 | "net" |
6 | 7 | ||
@@ -10,6 +11,7 @@ import ( | |||
10 | type ClientHandler struct { | 11 | type ClientHandler struct { |
11 | SocketListenOn string | 12 | SocketListenOn string |
12 | WebsocketServer string | 13 | WebsocketServer string |
14 | Context context.Context | ||
13 | } | 15 | } |
14 | 16 | ||
15 | func (h *ClientHandler) ServiceConnection(proxyconn net.Conn) { | 17 | func (h *ClientHandler) ServiceConnection(proxyconn net.Conn) { |
@@ -24,7 +26,7 @@ func (h *ClientHandler) ServiceConnection(proxyconn net.Conn) { | |||
24 | 26 | ||
25 | log.Println("Connected to server") | 27 | log.Println("Connected to server") |
26 | 28 | ||
27 | serviceBoth(wsconn, proxyconn) | 29 | serviceBoth(wsconn, proxyconn, h.Context) |
28 | } | 30 | } |
29 | 31 | ||
30 | func (h *ClientHandler) Run() { | 32 | func (h *ClientHandler) Run() { |