From 5e99a660073ee9bc21efb7300060081c69013d4b Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Mon, 2 May 2022 16:24:50 -0700 Subject: [PATCH] Use io.ReadWriteCloser instead of net.Conn in client --- client/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index fa46da9..9ac1d64 100644 --- a/client/client.go +++ b/client/client.go @@ -21,7 +21,7 @@ package client import ( "context" "errors" - "net" + "io" "reflect" "sync" @@ -44,7 +44,7 @@ var ( // Client is an lrpc client type Client struct { - conn net.Conn + conn io.ReadWriteCloser codec codec.Codec chMtx sync.Mutex @@ -52,7 +52,7 @@ type Client struct { } // New creates and returns a new client -func New(conn net.Conn, cf codec.CodecFunc) *Client { +func New(conn io.ReadWriteCloser, cf codec.CodecFunc) *Client { out := &Client{ conn: conn, codec: cf(conn),