MCPcopy
hub / github.com/livekit/livekit / Stop

Method Stop

test/client/client.go:782–802  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

780}
781
782func (c *RTCClient) Stop() {
783 logger.Infow("stopping client", "ID", c.ID())
784 _ = c.SendRequest(&livekit.SignalRequest{
785 Message: &livekit.SignalRequest_Leave{
786 Leave: &livekit.LeaveRequest{
787 Reason: livekit.DisconnectReason_CLIENT_INITIATED,
788 Action: livekit.LeaveRequest_DISCONNECT,
789 },
790 },
791 })
792 c.publisherFullyEstablished.Store(false)
793 c.subscriberFullyEstablished.Store(false)
794 _ = c.conn.Close()
795 if c.publisher != nil {
796 c.publisher.Close()
797 }
798 if c.subscriber != nil {
799 c.subscriber.Close()
800 }
801 c.cancel()
802}
803
804func (c *RTCClient) RefreshToken() string {
805 c.lock.Lock()

Callers 1

RunMethod · 0.95

Calls 4

IDMethod · 0.95
SendRequestMethod · 0.95
StoreMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected