Guides
Account events and tickets
Receive account WebSocket events and request location tickets.
ConnectEvents opens the account event WebSocket. Call Receive until the context ends, then close the connection. Listen runs that loop and calls your callback for each event. Pass the account token in AuthContext; the client does not refresh it for you.
conn, err := client.ConnectEvents(ctx, ring.ConnectEventsRequest{Auth: auth})
if err != nil {
return err
}
defer conn.Close()
event, err := conn.Receive()GetCapturedTickets returns tickets associated with a location. Use the
returned ticket only with its account and location. This request is separate
from the ticket exchange performed by OpenSignaling.
Unknown event fields remain available in Event.Data.
Wire contracts: account event frame and location tickets.