示例#1
0
 void Receive(NSData data, string peer, GKSession session, IntPtr context)
 {
     if (receiver != null)
     {
         receiver(session, new GKDataReceivedEventArgs(data, peer, session));
     }
 }
示例#2
0
 public override void FailedWithError(GKSession session, NSError error)
 {
     if (cbFailedWithError != null)
     {
         cbFailedWithError(session, new GKPeerConnectionEventArgs(session, null, error));
     }
 }
示例#3
0
 public override void PeerConnectionFailed(GKSession session, string peerID, NSError error)
 {
     if (cbConnectionFailed != null)
     {
         cbConnectionFailed(session, new GKPeerConnectionEventArgs(session, peerID, error));
     }
 }
示例#4
0
 public override void PeerConnectionRequest(GKSession session, string peerID)
 {
     if (cbConnectionRequest != null)
     {
         cbConnectionRequest(session, new GKPeerConnectionEventArgs(session, peerID, null));
     }
 }
示例#5
0
 public override void PeerChangedState(GKSession session, string peerID, GKPeerConnectionState state)
 {
     if (cbPeerChanged != null)
     {
         cbPeerChanged(session, new GKPeerChangedStateEventArgs(session, peerID, state));
     }
 }
示例#6
0
 public GKPeerConnectionEventArgs(GKSession session, string?peerID, NSError?error)
 {
     Session = session;
     PeerID  = peerID;
     Error   = error;
 }
示例#7
0
 public GKDataReceivedEventArgs(NSData data, string peer, GKSession session)
 {
     Data    = data;
     PeerID  = peer;
     Session = session;
 }
示例#8
0
 public GKPeerChangedStateEventArgs(GKSession session, string peerID, GKPeerConnectionState state)
 {
     Session = session;
     PeerID  = peerID;
     State   = state;
 }