Improve: using native http request
This commit is contained in:
@ -12,13 +12,8 @@ type DirectAdapter struct {
|
||||
conn net.Conn
|
||||
}
|
||||
|
||||
// Writer is used to output network traffic
|
||||
func (d *DirectAdapter) Writer() io.Writer {
|
||||
return d.conn
|
||||
}
|
||||
|
||||
// Reader is used to input network traffic
|
||||
func (d *DirectAdapter) Reader() io.Reader {
|
||||
// ReadWriter is used to handle network traffic
|
||||
func (d *DirectAdapter) ReadWriter() io.ReadWriter {
|
||||
return d.conn
|
||||
}
|
||||
|
||||
@ -27,6 +22,11 @@ func (d *DirectAdapter) Close() {
|
||||
d.conn.Close()
|
||||
}
|
||||
|
||||
// Close is used to close connection
|
||||
func (d *DirectAdapter) Conn() net.Conn {
|
||||
return d.conn
|
||||
}
|
||||
|
||||
type Direct struct {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user