Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetOrCreateClient(string)

Creates a new ChannelClient on a specific channel. If a client already exists, this method gets the client.
Read time 1 minuteLast updated 10 days ago

Definition

public static ChannelClient GetOrCreateClient(string channelName)

Parameters

channelName

The name of the channel to open. This matches the last part of a WebSocket URL. For example, "127.0.0.1:9090/\<channelName\>".

Returns

Type

Description

ChannelClientInstance of the newly-created or existing ChannelClient.

Remarks

This method does not automatically start clients that it creates. For information about starting a client, see ChannelClient.Start.