Developer Documentation
Our new developer documentation is now available. Please check it out!

OdinClient.JoinRoom

public async Task<Room> JoinRoom(string name, string userId)
public async Task<Room> JoinRoom(string name, string userId, Action<Room> setup = null)
public async Task<Room> JoinRoom(string name, string userId, IUserData userData, Action<Room> setup)
public async Task<Room> JoinRoom(string token, IUserData userData, Action<Room> setup)

Join or create a Room by name via a gateway

Parameters

NameTypeDescription
nameStringRoom name
userIdStringUser ID
setupAction<Room>will invoke to setup a room before adding or joining
userDataIUserDataSet new on room join
tokenStringRoom token

Returns

TypeDescription
Task<Room>or null

Variants

JoinRoom(name, userId)

public async Task<Room> JoinRoom(string name, string userId)

Join or create a Room by name via a gateway

Parameters

NameTypeDescription
nameStringRoom name
userIdStringUser ID

Returns

TypeDescription
Task<Room>or null

JoinRoom(name, userId, setup)

public async Task<Room> JoinRoom(string name, string userId, Action<Room> setup = null)

Join or create a Room by name via a gateway

Parameters

NameTypeDescription
nameStringRoom name
userIdStringOdin client ID
setupAction<Room>will invoke to setup a room before adding or joining

Returns

TypeDescription
Task<Room>or null

JoinRoom(name, userId, userData, setup)

public async Task<Room> JoinRoom(string name, string userId, IUserData userData, Action<Room> setup)

Join or create a Room by name via a gateway

Parameters

NameTypeDescription
nameStringRoom name
userIdStringOdin client ID
userDataIUserDataSet new on room join
setupAction<Room>will invoke to setup a room before adding or joining

Returns

TypeDescription
Task<Room>or null

JoinRoom(token, userData, setup)

public async Task<Room> JoinRoom(string token, IUserData userData, Action<Room> setup)

Join or create a Room by token via a gateway

Parameters

NameTypeDescription
tokenStringRoom token
userDataIUserDataSet new on room join
setupAction<Room>will invoke to setup a room before adding or joining

Returns

TypeDescription
Task<Room>or null