This commit is contained in:
crusader 2018-04-11 18:27:16 +09:00
parent 0b704161e6
commit e7d766bf07
3 changed files with 12 additions and 3 deletions

6
socket/client.go Normal file
View File

@ -0,0 +1,6 @@
package socket
type Client interface {
Connect() (readChan <-chan []byte, writeChan chan<- []byte, err error)
Disconnect() error
}

View File

@ -12,13 +12,15 @@ import (
)
type Client struct {
socket.Client
socket.ClientConnHandlers
socket.ReadWriteHandlers
Name string `json:"name"`
Name string `json:"name"`
Network string `json:"network"`
Address string `json:"address"`
Network string `json:"network"`
Address string `json:"address"`
LocalAddress net.Addr
stopChan chan struct{}

View File

@ -23,6 +23,7 @@ import (
var errMalformedURL = errors.New("malformed ws or wss URL")
type Client struct {
socket.Client
socket.ClientConnHandlers
socket.ReadWriteHandlers