StartServer() public method

Starts a server using a random number as address/name. Read the ServerInitialized events Info property to get the address name.
public StartServer ( ) : void
return void
コード例 #1
0
ファイル: LocalTest.cs プロジェクト: devluz/webrtcnetwork
    private void StartTest()
    {
        if (WebRtcNetwork.IsAvailable() == false)
        {
            Debug.LogWarning("WebRtcNetwork not available. Please run it in WebGL to test WebRtcNetwork!");
        }
        else
        {
            Debug.Log("WebRtcNetwork available. Starting test.");
            mServer = new WebRtcNetwork();
            mClient = new WebRtcNetwork();
            Debug.Log("Instance created");

            mState = State.ServerInit;
            Debug.Log("Start test " + mState);
            mServer.StartServer();
        }
    }