Click or drag to resize

StrixNetworkLeaveRoom Method (Int64, RoomLeaveEventHandler, FailureEventHandler, RequestConfig)

Leaves the match room this client is currently a member of (if any).

Namespace:  SoftGear.Strix.Unity.Runtime
Assembly:  StrixUnityRuntime (in StrixUnityRuntime.dll) Version: 1.5.0
Syntax
C#
public void LeaveRoom(
	long roomId,
	RoomLeaveEventHandler handler,
	FailureEventHandler failureHandler,
	RequestConfig config = null
)

Parameters

roomId
Type: SystemInt64
ID of the match room
handler
Type: SoftGear.Strix.Unity.Runtime.EventRoomLeaveEventHandler
This callback is invoked after you have successfully left the match room.
failureHandler
Type: SoftGear.Strix.Unity.Runtime.EventFailureEventHandler
This callback is invoked in case of a failure.
config (Optional)
Type: SoftGear.Strix.Client.Core.RequestRequestConfig
If not null, used to configure the request timeout. Default timeout is 30 seconds. See RequestConfig for more details.
Remarks
If you are the owner of the room, it gets destroyed.

Possible exception types in FailureEventArgs's cause:
ErrorCodeException Strix error which can be further separated by an error code:
ConnectionErrorFailed to send the request because of a connection error.
RequestTimeoutServer did not respond within the specified timeout interval.
RoomNotFoundRoom is not found or you're not a member of the room.
LockTimeout
See Also