MCPcopy Index your code
hub / github.com/livekit/livekit / createRTCClientWithToken

Function createRTCClientWithToken

test/integration_helpers.go:287–307  ·  view source on GitHub ↗

creates a client and runs against server

(token string, port int, testRTCServicePath testRTCServicePath, opts *testclient.Options)

Source from the content-addressed store, hash-verified

285
286// creates a client and runs against server
287func createRTCClientWithToken(token string, port int, testRTCServicePath testRTCServicePath, opts *testclient.Options) *testclient.RTCClient {
288 if opts == nil {
289 opts = &testclient.Options{
290 AutoSubscribe: true,
291 }
292 }
293 testRTCServicePathToTestClientOptions(testRTCServicePath, opts)
294 ws, err := testclient.NewWebSocketConn(fmt.Sprintf("ws://localhost:%d", port), token, opts)
295 if err != nil {
296 panic(err)
297 }
298
299 c, err := testclient.NewRTCClient(ws, opts.UseJoinRequestQueryParam, opts)
300 if err != nil {
301 panic(err)
302 }
303
304 go c.Run()
305
306 return c
307}
308
309func redisClient() *redis.Client {
310 return redis.NewClient(&redis.Options{

Callers 4

createRTCClientFunction · 0.85
TestSingleNodeAttributesFunction · 0.85

Calls 2

RunMethod · 0.95