Use h2c from x/net to handle h2c requests
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
c7d336f958
commit
4360ca14c1
224 changed files with 22414 additions and 11768 deletions
11
vendor/golang.org/x/net/ipv4/payload_nocmsg.go
generated
vendored
11
vendor/golang.org/x/net/ipv4/payload_nocmsg.go
generated
vendored
|
@ -2,14 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build nacl plan9 windows
|
||||
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
|
||||
|
||||
package ipv4
|
||||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
)
|
||||
import "net"
|
||||
|
||||
// ReadFrom reads a payload of the received IPv4 datagram, from the
|
||||
// endpoint c, copying the payload into b. It returns the number of
|
||||
|
@ -17,7 +14,7 @@ import (
|
|||
// src of the received datagram.
|
||||
func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
|
||||
if !c.ok() {
|
||||
return 0, nil, nil, syscall.EINVAL
|
||||
return 0, nil, nil, errInvalidConn
|
||||
}
|
||||
if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
|
||||
return 0, nil, nil, err
|
||||
|
@ -33,7 +30,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
|
|||
// control of the outgoing datagram is not required.
|
||||
func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
|
||||
if !c.ok() {
|
||||
return 0, syscall.EINVAL
|
||||
return 0, errInvalidConn
|
||||
}
|
||||
if dst == nil {
|
||||
return 0, errMissingAddress
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue