Save current state of the world

This commit is contained in:
Asim Aslam
2019-12-11 14:37:03 +00:00
parent ff69d46c98
commit 6e28e7a86f
5 changed files with 97 additions and 44 deletions

View File

@@ -38,6 +38,8 @@ type DialOptions struct {
Link string
// specify mode of the session
Mode Mode
// Wait for connection to be accepted
Wait bool
// the dial timeout
Timeout time.Duration
}
@@ -124,6 +126,14 @@ func DialLink(id string) DialOption {
}
}
// DialWait specifies whether to wait for the connection
// to be accepted before returning the session
func DialWait(b bool) DialOption {
return func(o *DialOptions) {
o.Wait = b
}
}
// DefaultOptions returns router default options
func DefaultOptions() Options {
return Options{