mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-13 03:49:35 +03:00
XUDP protocol: Add Global ID & UoT Migration
The first UoT protocol that supports UoT Migration Thank @yuhan6665 for testing
This commit is contained in:
@ -25,3 +25,17 @@ func (r *Reader) ReadMultiBufferTimeout(d time.Duration) (buf.MultiBuffer, error
|
||||
func (r *Reader) Interrupt() {
|
||||
r.pipe.Interrupt()
|
||||
}
|
||||
|
||||
// ReturnAnError makes ReadMultiBuffer return an error, only once.
|
||||
func (r *Reader) ReturnAnError(err error) {
|
||||
r.pipe.errChan <- err
|
||||
}
|
||||
|
||||
// Recover catches an error set by ReturnAnError, if exists.
|
||||
func (r *Reader) Recover() (err error) {
|
||||
select {
|
||||
case err = <-r.pipe.errChan:
|
||||
default:
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user