mirror of
https://github.com/pion/stun.git
synced 2025-10-05 15:56:56 +08:00
client: add Indicate method
This commit is contained in:
@@ -154,6 +154,12 @@ func (c *Client) Close() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Indicate sends indication m to server. Shorthand to Do call
|
||||||
|
// with zero deadline and callback.
|
||||||
|
func (c *Client) Indicate(m *Message) error {
|
||||||
|
return c.Do(m, time.Time{}, nil)
|
||||||
|
}
|
||||||
|
|
||||||
// Do starts transaction (if f set) and writes message to server.
|
// Do starts transaction (if f set) and writes message to server.
|
||||||
func (c *Client) Do(m *Message, d time.Time, f func(AgentEvent)) error {
|
func (c *Client) Do(m *Message, d time.Time, f func(AgentEvent)) error {
|
||||||
if f != nil {
|
if f != nil {
|
||||||
|
Reference in New Issue
Block a user