-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For go1.19+: update to github.com/pion/transport/v3 For go1.18: keep github.com/pion/transport/v2 Support of go1.18 will be dropped (current plan is to support it until the end of 2023) and then the v2 can be removed fully.
- Loading branch information
1 parent
03606f8
commit 34aabe8
Showing
5 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//go:build !go1.18 | ||
// +build !go1.18 | ||
|
||
package net | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/pion/transport/v3/udp" | ||
) | ||
|
||
func ListenUDPConfig() udp.ListenConfig { | ||
return udp.ListenConfig{ | ||
AcceptFilter: tlsPacketFilter, | ||
} | ||
} | ||
|
||
func IsUDPClosedError(err error) bool { | ||
return errors.Is(err, udp.ErrClosedListener) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//go:build go1.18 | ||
// +build go1.18 | ||
|
||
package net | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/pion/transport/v2/udp" | ||
) | ||
|
||
func ListenUDPConfig() udp.ListenConfig { | ||
return udp.ListenConfig{ | ||
AcceptFilter: tlsPacketFilter, | ||
} | ||
} | ||
|
||
func IsUDPClosedError(err error) bool { | ||
return errors.Is(err, udp.ErrClosedListener) | ||
} |