ing
This commit is contained in:
parent
0b704161e6
commit
e7d766bf07
6
socket/client.go
Normal file
6
socket/client.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
package socket
|
||||||
|
|
||||||
|
type Client interface {
|
||||||
|
Connect() (readChan <-chan []byte, writeChan chan<- []byte, err error)
|
||||||
|
Disconnect() error
|
||||||
|
}
|
|
@ -12,13 +12,15 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
socket.Client
|
||||||
|
|
||||||
socket.ClientConnHandlers
|
socket.ClientConnHandlers
|
||||||
socket.ReadWriteHandlers
|
socket.ReadWriteHandlers
|
||||||
|
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
Network string `json:"network"`
|
Network string `json:"network"`
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
LocalAddress net.Addr
|
LocalAddress net.Addr
|
||||||
|
|
||||||
stopChan chan struct{}
|
stopChan chan struct{}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import (
|
||||||
var errMalformedURL = errors.New("malformed ws or wss URL")
|
var errMalformedURL = errors.New("malformed ws or wss URL")
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
socket.Client
|
||||||
socket.ClientConnHandlers
|
socket.ClientConnHandlers
|
||||||
socket.ReadWriteHandlers
|
socket.ReadWriteHandlers
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user