2015-12-01 20:12:01 -08:00
|
|
|
package proxy
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
|
2016-01-25 14:34:08 -08:00
|
|
|
tmspcli "github.com/tendermint/tmsp/client"
|
2015-12-01 20:12:01 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
// This is goroutine-safe, but users should beware that
|
|
|
|
// the application in general is not meant to be interfaced
|
|
|
|
// with concurrent callers.
|
2016-01-06 17:14:20 -08:00
|
|
|
type remoteAppConn struct {
|
2016-01-22 15:48:13 -08:00
|
|
|
*tmspcli.TMSPClient
|
2015-12-01 20:12:01 -08:00
|
|
|
}
|
|
|
|
|
2016-01-06 17:14:20 -08:00
|
|
|
func NewRemoteAppConn(conn net.Conn, bufferSize int) *remoteAppConn {
|
|
|
|
app := &remoteAppConn{
|
2016-01-22 15:48:13 -08:00
|
|
|
TMSPClient: tmspcli.NewTMSPClient(conn, bufferSize),
|
2015-12-01 20:12:01 -08:00
|
|
|
}
|
|
|
|
return app
|
|
|
|
}
|