Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Initiate a request to the server failed: SendError

$
0
0

My Client Code is:

public override void Execute(int eventCode, object message)
{
switch (eventCode)
{
case 0:
socketMsg = message as SocketMsg;
Dictionary p = new Dictionary();
p[0] = socketMsg.Value;
OperationRequest((byte)socketMsg.OpCode, p, (byte)socketMsg.SubCode);
Debug.Log("It's ok");
break;
default:
break;
}
}

public void OperationRequest(byte opCode, Dictionary parameters = null, byte subCode = 0)
{

parameters[80] = subCode;
peer.OpCustom(opCode, parameters, true);
}

The Error detail:

SendError
UnityEngine.Debug:Log(Object)
PhotonManager:OnStatusChanged(StatusCode) (at Assets/Scripts/Net/PhotonManager.cs:144)
ExitGames.Client.Photon.EnetPeer:EnqueueOperation(Dictionary`2, Byte, Boolean, Byte, Boolean, EgMessageType)
ExitGames.Client.Photon.PeerBase:EnqueueOperation(Dictionary`2, Byte, Boolean, Byte, Boolean)
ExitGames.Client.Photon.PhotonPeer:OpCustom(Byte, Dictionary`2, Boolean, Byte)
ExitGames.Client.Photon.PhotonPeer:OpCustom(Byte, Dictionary`2, Boolean)
PhotonManager:OperationRequest(Byte, Dictionary`2, Byte) (at Assets/Scripts/Net/PhotonManager.cs:101)
PhotonManager:Execute(Int32, Object) (at Assets/Scripts/Net/PhotonManager.cs:84)
MsgCenter:Dispatch(Int32, Int32, Object) (at Assets/Scripts/Framework/Msg/MsgCenter.cs:50)
UIBase:Dispatch(Int32, Int32, Object) (at Assets/Scripts/UI/UIBase.cs:50)
LoginView:GetConfig() (at Assets/Scripts/UI/LoginView.cs:76)
LoginView:IsNetworkConnect() (at Assets/Scripts/UI/LoginView.cs:67)
LoginView:Start() (at Assets/Scripts/UI/LoginView.cs:46)

How should I solve it?


Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>