2017-11-27 11:54:15 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
2017-12-01 07:02:55 +00:00
|
|
|
crc "git.loafle.net/commons_go/rpc/client"
|
2017-11-29 12:24:39 +00:00
|
|
|
crcrwf "git.loafle.net/commons_go/rpc/client/rwc/websocket/fasthttp"
|
2017-11-30 05:43:54 +00:00
|
|
|
cwfc "git.loafle.net/commons_go/websocket_fasthttp/client"
|
2017-11-27 11:54:15 +00:00
|
|
|
)
|
|
|
|
|
2017-12-01 07:02:55 +00:00
|
|
|
func New(clientHandler ClientHandler, socketBuilder cwfc.SocketBuilder) Client {
|
2017-11-30 05:43:54 +00:00
|
|
|
cRWCHandler := crcrwf.New(socketBuilder)
|
2017-11-27 11:54:15 +00:00
|
|
|
|
2017-12-01 07:02:55 +00:00
|
|
|
c := &client{}
|
|
|
|
c.Client = crc.New(clientHandler, cRWCHandler)
|
2017-11-27 11:54:15 +00:00
|
|
|
|
2017-11-29 10:07:49 +00:00
|
|
|
return c
|
2017-11-27 11:54:15 +00:00
|
|
|
}
|
2017-12-01 07:02:55 +00:00
|
|
|
|
|
|
|
type Client interface {
|
|
|
|
crc.Client
|
|
|
|
}
|
|
|
|
|
|
|
|
type client struct {
|
|
|
|
crc.Client
|
|
|
|
}
|