mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-17 21:58:12 -07:00
udp: Add basic UDP tests
This commit is contained in:
@@ -45,6 +45,13 @@ func (e ClientError) Error() string { return string(e) }
|
||||
func (e NotFoundError) Error() string { return string(e) }
|
||||
func (e ProtocolError) Error() string { return string(e) }
|
||||
|
||||
func IsPublicError(err error) bool {
|
||||
_, cl := err.(ClientError)
|
||||
_, nf := err.(NotFoundError)
|
||||
_, pc := err.(ProtocolError)
|
||||
return cl || nf || pc
|
||||
}
|
||||
|
||||
type PeerList []Peer
|
||||
type PeerKey string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user