예제 #1
0
파일: client.go 프로젝트: devick/flynn
func NewClient(conn *net.UnixConn) *rpcplus.Client {
	fdReader := NewFDReader(conn)
	encBuf := bufio.NewWriter(fdReader)
	client := &gobClientCodec{fdReader, gob.NewDecoder(fdReader), gob.NewEncoder(encBuf), encBuf}
	return rpcplus.NewClientWithCodec(client)
}
예제 #2
0
// NewClient returns a new rpc.Client to handle requests to the
// set of services at the other end of the connection.
func NewClient(conn io.ReadWriteCloser) *rpc.Client {
	return rpc.NewClientWithCodec(NewClientCodec(conn))
}