Click or drag to resize

StrixNetworkSendRoomDirectRelay Method (UID, Object, RoomDirectRelayEventHandler, FailureEventHandler, RequestConfig)

Sends a relay message to a match room member.

Namespace:  SoftGear.Strix.Unity.Runtime
Assembly:  StrixUnityRuntime (in StrixUnityRuntime.dll) Version: 1.5.0
Syntax
C#
public void SendRoomDirectRelay(
	UID to,
	Object messageToRelay,
	RoomDirectRelayEventHandler handler,
	FailureEventHandler failureHandler,
	RequestConfig config = null
)

Parameters

to
Type: SoftGear.Strix.Client.CoreUID
ID of the member to whom the message is sent.
messageToRelay
Type: SystemObject
The message that will be sent.
handler
Type: SoftGear.Strix.Unity.Runtime.EventRoomDirectRelayEventHandler
This callback is invoked when the relay message has been sent successfully.
failureHandler
Type: SoftGear.Strix.Unity.Runtime.EventFailureEventHandler
This callback is invoked if the message could not be sent for some reason.
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
NullReferenceExceptionThrows if you're not joined to a room.
Remarks
The member receiving the message must be in the same room with the sender. Unlike RPCs, the member who sends the message does not receive it.

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.
NotRoomMemberYou're trying to send a relay message while not being joined to a room.
LockTimeout
See Also