/AWS1/CL_GMZ=>CREATESTREAMSESSIONCONN()
¶
About CreateStreamSessionConnection¶
Allows clients to reconnect to a recently disconnected stream session without losing any data from the last session.
A client can reconnect to a stream session that's in PENDING_CLIENT_RECONNECTION
or ACTIVE
status. In the stream session life cycle, when the client disconnects from the stream session, the stream session transitions from CONNECTED
to PENDING_CLIENT_RECONNECTION
status. When a client requests to reconnect by calling CreateStreamSessionConnection
, the stream session transitions to RECONNECTING
status. When the reconnection is successful, the stream session transitions to ACTIVE
status. After a stream session is disconnected for longer than ConnectionTimeoutSeconds
, the stream session transitions to the TERMINATED
status.
To connect to an existing stream session, specify the stream group ID and stream session ID that you want to reconnect to, as well as the signal request settings to use with the stream.
ConnectionTimeoutSeconds
defines the amount of time after the stream session disconnects that a reconnection is allowed. If a client is disconnected from the stream for longer than ConnectionTimeoutSeconds
, the stream session ends.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_identifier
TYPE /AWS1/GMZIDENTIFIER
/AWS1/GMZIDENTIFIER
¶
Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4
. Example ID:sg-1AB2C3De4
.The stream group that you want to run this stream session with. The stream group must be in
ACTIVE
status and have idle stream capacity.
iv_streamsessionidentifier
TYPE /AWS1/GMZIDENTIFIER
/AWS1/GMZIDENTIFIER
¶
Amazon Resource Name (ARN) or ID that uniquely identifies the stream session resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567
. Example ID:ABC123def4567
.The stream session must be in
PENDING_CLIENT_RECONNECTION
orACTIVE
status.
iv_signalrequest
TYPE /AWS1/GMZSIGNALREQUEST
/AWS1/GMZSIGNALREQUEST
¶
A WebRTC ICE offer string to use when initializing a WebRTC connection. The offer is a very long JSON string. Provide the string as a text value in quotes. The offer must be newly generated, not the same offer provided to
StartStreamSession
.
Optional arguments:¶
iv_clienttoken
TYPE /AWS1/GMZCLIENTTOKEN
/AWS1/GMZCLIENTTOKEN
¶
A unique identifier that represents a client request. The request is idempotent, which ensures that an API request completes only once. When users send a request, Amazon GameLift Streams automatically populates this field.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_gmzcrestrmsessconnout
/AWS1/CL_GMZCRESTRMSESSCONNOUT
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_gmz~createstreamsessionconn(
iv_clienttoken = |string|
iv_identifier = |string|
iv_signalrequest = |string|
iv_streamsessionidentifier = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_signalresponse = lo_result->get_signalresponse( ).
ENDIF.