On Tue, Jun 4, 2019 at 9:56 AM 杜沁园 wrote:
>
> When there is no data in tcp connection, net.Conn.Read will block.
>
> Then I want to cancel the net.Conn.Read from another goroutine, But I do
> not want to close the connection, Because I will reuse it latter. How to
> write the code???
>
>
When there is no data in tcp connection, net.Conn.Read will block.
Then I want to cancel the net.Conn.Read from another goroutine, But I do
not want to close the connection, Because I will reuse it latter. How to
write the code???
For example:
func (p *proxy) toClient(ctx context.C