Click or drag to resize

StrixNetworkSearchJoinableRoom Method (Int32, Int32, RoomSearchEventHandler, FailureEventHandler, RequestConfig)

Starts an asynchronous search for match rooms that have enough room for joining. After search is complete handler callback is invoked with a list of found rooms.

Namespace:  SoftGear.Strix.Unity.Runtime
Assembly:  StrixUnityRuntime (in StrixUnityRuntime.dll) Version: 1.5.0
Syntax
C#
public void SearchJoinableRoom(
	int limit,
	int offset,
	RoomSearchEventHandler handler,
	FailureEventHandler failureHandler,
	RequestConfig config = null
)

Parameters

limit
Type: SystemInt32
Limits the number of search results. This value must be greater than 0.
offset
Type: SystemInt32
The starting offset in the search results, e.g. if limit is set to 10, and offset is set to 15, the search will result in rooms 15 to 25.
handler
Type: SoftGear.Strix.Unity.Runtime.EventRoomSearchEventHandler
This callback is invoked when the room search completes.
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.
Exceptions
ExceptionCondition
NullReferenceExceptionThrown if called before connecting to the master server.
Remarks
To use this method you have to connect to the master server at least once. If disconnected, calling this method will reconnect to the master server with the last used host and port parameters. Despite the name, it doesn't check if isJoinable parameter of the match room is set to .

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.
See Also