Example #1
0
 protected virtual void HandleClientReadyResponse(
     ResponseHandlerData responseHandler,
     AckResponseCode responseCode,
     EmptyMessage response)
 {
     // Override this function to do something by response code
 }
Example #2
0
 protected virtual UniTaskVoid HandleEnterGameResponse(
     ResponseHandlerData responseHandler,
     AckResponseCode responseCode,
     EnterGameResponseMessage response)
 {
     if (responseCode == AckResponseCode.Success)
     {
         ClientConnectionId = response.connectionId;
         if (!IsServer || !IsClientConnected)
         {
             HandleServerSceneChange(response.serverSceneName);
         }
     }
     else
     {
         if (LogError)
         {
             Logging.LogError(LogTag, "Enter game request was refused by server, disconnecting...");
         }
         StopClient();
     }
     return(default);
Example #3
0
 protected virtual void HandleEnterGameResponse(
     ResponseHandlerData responseHandler,
     AckResponseCode responseCode,
     EnterGameResponseMessage response)
 {
     if (responseCode == AckResponseCode.Success)
     {
         ClientConnectionId = response.connectionId;
         if (IsClientConnected)
         {
             HandleServerSceneChange(response.serverSceneName);
         }
     }
     else
     {
         if (LogError)
         {
             Logging.LogError(LogTag, "Enter game request was refused by server, disconnecting...");
         }
         OnClientConnectionRefused();
     }
 }
Example #4
0
 internal abstract void InvokeResponse(ResponseHandlerData responseHandler, AckResponseCode responseCode, ResponseDelegate responseDelegate);
Example #5
0
 public AsyncResponseData(ResponseHandlerData requestHandler, AckResponseCode responseCode, TResponse response)
 {
     RequestHandler = requestHandler;
     ResponseCode   = responseCode;
     Response       = response;
 }