Exemple #1
0
 /// <summary>Connect to a running instance of Wwise Authoring.</summary>
 /// <param name="uri">URI to connect. Usually the WebSocket protocol (ws:) followed by the hostname and port, followed by waapi.</param>
 /// <example>Connect("ws://localhost:8080/waapi")</example>
 /// <param name="timeout">The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.</param>
 public async System.Threading.Tasks.Task Connect(
     string uri  = "ws://localhost:8080/waapi",
     int timeout = System.Int32.MaxValue)
 {
     if (wamp == null)
     {
         wamp = new Wamp();
     }
     wamp.Disconnected += Wamp_Disconnected;
     await wamp.Connect(uri, timeout);
 }
Exemple #2
0
    /// <summary>Close the connection.</summary>
    /// <param name="timeout">The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.</param>
    public async System.Threading.Tasks.Task Close(
        int timeout = System.Int32.MaxValue)
    {
        if (wamp == null)
        {
            throw new Wamp.WampNotConnectedException("WAMP connection is not established");
        }

        await wamp.Close(timeout);

        wamp.Disconnected -= Wamp_Disconnected;
        wamp = null;
    }
Exemple #3
0
 public Lcu(Lockfile lockfile, LcuConfig config) : base()
 {
     _requester = new LcuRequester(lockfile, config);
     wamp       = new Wamp(lockfile, config);
 }