Photon.SocketServer.PeerBase Constructor problems.
Hey everyone,
first sorry for my bad english.
I have the following problem:
in my old Server version (Photon-Server-SDK_v3-4-31-10808 and )
I Used the following code to create a ClientPeer:
now i will translate them to the newest version (Photon-OnPremise-Server-SDK_v4-0-29-11263)
But the i have the problem, tha i cant initialize the base, Visual Studios tells me: "PeerBase didnt have a constructor that takes 2 Arguments". I have tryed it with 1 with 0 with 3, but i become only this failure. I cant see how much arguments the base constructor takes. ANd i havent found anithing in the documentation....
Can anyone help me fix this bug??
THX alot
Greetings
BirnchenStudios
first sorry for my bad english.
I have the following problem:
in my old Server version (Photon-Server-SDK_v3-4-31-10808 and )
I Used the following code to create a ClientPeer:
public class PhotonClientPeer : PeerBase
{
public PhotonClientPeer(IRpcProtocol protocol, IPhotonPeer photonPeer, IEnumerable<ClientData> clientData, PhotonClientHandlerList handlerList, PhotonApplication application)
: base()
{
_peerId = Guid.NewGuid();
_handlerList = handlerList;
_server = application;
foreach (var data in clientData)
{
_clientData.Add(data.GetType(), data);
}
_server.ConnectionCollection<PhotonConnectionCollection>().Clients.Add(_peerId, this);
}
}
now i will translate them to the newest version (Photon-OnPremise-Server-SDK_v4-0-29-11263)
But the i have the problem, tha i cant initialize the base, Visual Studios tells me: "PeerBase didnt have a constructor that takes 2 Arguments". I have tryed it with 1 with 0 with 3, but i become only this failure. I cant see how much arguments the base constructor takes. ANd i havent found anithing in the documentation....
Can anyone help me fix this bug??
THX alot
Greetings
BirnchenStudios
0
Comments
-
Heyho,
after a few hours of searching i have figured out what the problem is.
In V3 i have done it with the protocol and Peer, i v4 i must do it with the init request.... Now i must look how i can change my auto fac factory for initrequest...
Greetings
BirnchenStudios0 -
Hi @BirnchenStudios,
Thank you for choosing Photon!
ICYMI we have a 3.4 to 4.x migration guide. It may be helpful for you.0