Source File
ping.go
Belonging Package
github.com/libp2p/go-yamux/v5
package yamuximporttype ping struct {id uint32// written to by the session on ping responsepingResponse chan struct{}// closed by the Ping call that sent the ping when done.done chan struct{}// result set before done is closed.err errorduration time.Duration}func newPing( uint32) *ping {return &ping{id: ,pingResponse: make(chan struct{}, 1),done: make(chan struct{}),}}func ( *ping) ( time.Duration, error) {.err =.duration =close(.done)}func ( *ping) () (time.Duration, error) {<-.donereturn .duration, .err}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |