forked from quic-go/quic-go
rename files dealing with low level conns to sys_conn
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: conn_oob.go
|
||||
// Source: sys_conn_oob.go
|
||||
|
||||
// Package quic is a generated GoMock package.
|
||||
package quic
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
// connection is a connection that allow reading of a receivedPacket.
|
||||
type connection interface {
|
||||
ReadPacket() (*receivedPacket, error)
|
||||
WritePacket(b []byte, addr net.Addr, oob []byte) (int, error)
|
||||
@@ -17,7 +18,8 @@ type connection interface {
|
||||
io.Closer
|
||||
}
|
||||
|
||||
// If the PacketConn passed to Dial or Listen satisfies this interface, quic-go will read the ECN bits from the IP header.
|
||||
// OOBCapablePacketConn is a connection that allows the reading of ECN bits from the IP header.
|
||||
// If the PacketConn passed to Dial or Listen satisfies this interface, quic-go will use it.
|
||||
// In this case, ReadMsgUDP() will be used instead of ReadFrom() to read packets.
|
||||
type OOBCapablePacketConn interface {
|
||||
net.PacketConn
|
||||
@@ -50,6 +52,11 @@ func wrapConn(pc net.PacketConn) (connection, error) {
|
||||
return newConn(c)
|
||||
}
|
||||
|
||||
// The basicConn is the most trivial implementation of a connection.
|
||||
// It reads a single packet from the underlying net.PacketConn.
|
||||
// It is used when
|
||||
// * the net.PacketConn is not a OOBCapablePacketConn, and
|
||||
// * when the OS doesn't support OOB.
|
||||
type basicConn struct {
|
||||
net.PacketConn
|
||||
}
|
||||
Reference in New Issue
Block a user