package yamux

import 

type ping struct {
	id uint32
	// written to by the session on ping response
	pingResponse chan struct{}

	// closed by the Ping call that sent the ping when done.
	done chan struct{}
	// result set before done is closed.
	err      error
	duration 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) {
	<-.done
	return .duration, .err
}