quic: rename side type to connSide

The clearest name for vars of this type is often "side",
so make the type name distinct to avoid conflicts.

For golang/go#58547

Change-Id: I35fda7ae70e54cd063bae7a83bcb2c8f5f76244f
Reviewed-on: https://go-review.googlesource.com/c/net/+/501375
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Damien Neil 2023-06-06 14:01:59 -07:00
Родитель 508a5732b4
Коммит ab184e6fa8
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -39,15 +39,15 @@ const (
// https://www.rfc-editor.org/rfc/rfc9002.html#section-6.1.2-6
const timerGranularity = 1 * time.Millisecond
// A side distinguishes between the client and server sides of a connection.
type side int8
// A connSide distinguishes between the client and server sides of a connection.
type connSide int8
const (
clientSide = side(iota)
clientSide = connSide(iota)
serverSide
)
func (s side) String() string {
func (s connSide) String() string {
switch s {
case clientSide:
return "client"
@ -118,7 +118,7 @@ const (
dirStreamBitMask = 0x2
)
func newStreamID(initiator side, typ streamType, num int64) streamID {
func newStreamID(initiator connSide, typ streamType, num int64) streamID {
id := streamID(num << 2)
if typ == uniStream {
id |= uniStreamBit
@ -129,7 +129,7 @@ func newStreamID(initiator side, typ streamType, num int64) streamID {
return id
}
func (s streamID) initiator() side {
func (s streamID) initiator() connSide {
if s&initiatorStreamBitMask == serverInitiatedStreamBit {
return serverSide
}