Add new TCPBufferSize parameter to network

This commit is contained in:
9seconds
2021-03-17 21:44:42 +03:00
parent 5e31b95bb5
commit 57cb1b5aa0
11 changed files with 54 additions and 3 deletions
+4
View File
@@ -60,6 +60,10 @@ func (d *defaultDialer) DialContext(ctx context.Context, network, address string
return tcpConn, nil
}
func (d *defaultDialer) TCPBufferSize() int {
return d.bufferSize
}
func NewDefaultDialer(timeout time.Duration, bufferSize int) (Dialer, error) {
switch {
case timeout < 0: