func (c *conn) Read(b []byte) (n int, err error) {
	var data []byte

	if c.rdata != nil {
		data = c.rdata
	} else {
		data = <-c.readCh
	}

	if data == nil {
		return 0, io.EOF
	}

	if len(data) > len(b) {
		copy(b, data[:len(b)])
		c.rdata = data[len(b):]
		return len(b), nil
	}

	c.rdata = nil
	copy(b, data)

	return len(data), nil
}
// Read receives data from the connection over proxy service
Read receives data from the connection over proxy service
// Read receives data from the connection over proxy service
func (c *conn) Read(b []byte) (n int, err error) {
	var data []byte
	if c.rdata != nil {
		data = c.rdata
	} else {
		data = <-c.readCh
	}
	if data == nil {
		return 0, io.EOF
	}
	if len(data) > len(b) {
		copy(b, data[:len(b)])
		c.rdata = data[len(b):]
		return len(b), nil
	}
	c.rdata = nil
	copy(b, data)
	return len(data), nil
}
func ( c * conn ) Read ( b [ ] byte ) ( n int , err error ) { var data [ ] byte if c . rdata != nil { data = c . rdata } else { data = <- c . readCh } if data == nil { return 0 , io . EOF } if len ( data ) > len ( b ) { copy ( b , data [ : len ( b ) ] ) c . rdata = data [ len ( b ) : ] return len ( b ) , nil } c . rdata = nil copy ( b , data ) return len ( data ) , nil }
Read receives data from the connection over proxy service
Read receives data from the connection over proxy service