how to get a list of peers?
Options
Comments
-
vetnabivao wrote:how to get a list of peers?
I'm not sure if there is something in the API for this (there may be), but you could store them in a collection after you create them.0 -
and then how to send an event or transaction specific feast?0
-
vetnabivao wrote:and then how to send an event or transaction specific feast?
I am not sure I understand the exact format of your question as written...but, to send an event:
1. Create the event data structure
2. Call your Server's PeerBase implementation's (the one you create with CreatePeer) SendEvent method; pass in the event data and send parameters.
Here's an example:EventData eventData = new EventData((byte)OpCodes.Move); eventData.Parameters = new Dictionary<byte, object> { { 0, entityFound.ID }, { 1, newPosition } }; this.SendEvent(eventData, sendParameters);
Note that the Server is sending the event in response to an operation request...so I am using the sendParameters passed into the OnOperationRequest callback. You could create them yourself though.
An example of this implementation can be found: http://doc.exitgames.com/photon-server/ ... -tutorials
Also, this is useful info: http://doc.exitgames.com/photon-server/ ... Operations0 -
vetnabivao wrote:how to get a list of peers?
Sorry - but for now there is no list of peers - you'll have to implement that yourself.0 -
The search function is really helpful.
Here are a few tips how to get the list of peers:
http://forum.exitgames.com/viewtopic.php?f=5&t=2460&p=115010