message-size-increase #3
18
dial.go
18
dial.go
@ -1,9 +1,9 @@
|
|||||||
package hopp
|
package hopp
|
||||||
|
|
||||||
import "net"
|
import "net"
|
||||||
|
import "errors"
|
||||||
import "context"
|
import "context"
|
||||||
import "crypto/tls"
|
import "crypto/tls"
|
||||||
import "github.com/quic-go/quic-go"
|
|
||||||
|
|
||||||
// Dial opens a connection to a server. The network must be one of "quic",
|
// Dial opens a connection to a server. The network must be one of "quic",
|
||||||
// "quic4", (IPv4-only) "quic6" (IPv6-only), or "unix". For now, "quic4" and
|
// "quic4", (IPv4-only) "quic6" (IPv6-only), or "unix". For now, "quic4" and
|
||||||
@ -31,12 +31,7 @@ func (diale Dialer) Dial(ctx context.Context, network, address string) (Conn, er
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (diale Dialer) dialQUIC(ctx context.Context, network, address string) (Conn, error) {
|
func (diale Dialer) dialQUIC(ctx context.Context, network, address string) (Conn, error) {
|
||||||
// sorry i fucking lied to you about the network parameter. for all
|
return nil, errors.New("quic is not yet implemented")
|
||||||
// quic-go's bullshit bloat, it doesnt even support that. not even when
|
|
||||||
// instantiating a transport. go figure :/
|
|
||||||
conn, err := quic.DialAddr(ctx, address, tlsConfig(diale.TLSConfig), quicConfig())
|
|
||||||
if err != nil { return nil, err }
|
|
||||||
return AdaptB(quicMultiConn { underlying: conn }), nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (diale Dialer) dialUnix(ctx context.Context, network, address string) (Conn, error) {
|
func (diale Dialer) dialUnix(ctx context.Context, network, address string) (Conn, error) {
|
||||||