Пример #1
0
 private void StartInternal()
 {
     if (!P2PTransportLayer.Instance.IsStarted())
     {
         this.m_Started = false;
     }
     if (this.m_Started)
     {
         return;
     }
     if (this.m_RunInBackground)
     {
         Application.runInBackground = true;
     }
     this.m_Started   = true;
     this.m_AmIMaster = true;
     P2PTransportLayer.Instance.Init();
     this.m_MsgBuffer = new byte[65535];
     this.m_MsgReader = new P2PNetworkReader(this.m_MsgBuffer);
     if (this.LocalPeer.m_Address == null)
     {
         this.LocalPeer.m_Address = P2PAddressCreator.CreateAddress(P2PSession.s_TransportLayerType);
     }
     this.RegisterMessageHandlers();
     if (P2PLogFilter.logDebug)
     {
         Debug.Log("P2PSession started.");
     }
 }
Пример #2
0
 public bool Start()
 {
     return(this.Start(P2PAddressCreator.CreateAddress(P2PSession.s_TransportLayerType)));
 }