mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 14:14:02 +03:00
Add NativeDialer method to mtglib.Network
This commit is contained in:
+5
-1
@@ -124,13 +124,17 @@ type Network interface {
|
||||
// Dial establishes context-free TCP connections.
|
||||
Dial(network, address string) (essentials.Conn, error)
|
||||
|
||||
// DialContext dials using a context. This is a preferrable way of
|
||||
// DialContext dials using a context. This is a preferable way of
|
||||
// establishing TCP connections.
|
||||
DialContext(ctx context.Context, network, address string) (essentials.Conn, error)
|
||||
|
||||
// MakeHTTPClient build an HTTP client with given dial function. If nothing is
|
||||
// provided, then DialContext of this interface is going to be used.
|
||||
MakeHTTPClient(func(ctx context.Context, network, address string) (essentials.Conn, error)) *http.Client
|
||||
|
||||
// NativeDialer returns a configured instance of native dialer that
|
||||
// skips proxy connections or any other irrelevant settings.
|
||||
NativeDialer() *net.Dialer
|
||||
}
|
||||
|
||||
// AntiReplayCache is an interface that is used to detect replay attacks based
|
||||
|
||||
Reference in New Issue
Block a user