Ejemplo n.º 1
0
    /// <summary>
    /// Creates an OSC Server (listens to upcoming OSC messages) given an incoming port.
    /// </summary>
    /// <param name="serverId">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="port">
    /// A <see cref="System.Int32"/>
    /// </param>
    public void CreateReciever(string serverId, int port)
    {
        ReceiverLog serveritem = new ReceiverLog();

        serveritem.receiver = new OSCReciever(port);
        serveritem.log      = new List <LogInfo>();
        serveritem.packets  = new List <OSCPacket>();

        _receivers.Add(serverId, serveritem);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Creates an OSC Server (listens to upcoming OSC messages) given an incoming port.
    /// </summary>
    /// <param name="serverId">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="port">
    /// A <see cref="System.Int32"/>
    /// </param>
    public void CreateReciever(string serverId, int port)
    {
        if (!_receivers.ContainsKey(serverId))
        {
            ReceiverLog serveritem = new ReceiverLog();
            serveritem.receiver = new OSCReciever(port);
            serveritem.log      = new List <LogInfo>();
            serveritem.packets  = new List <OSCPacket>();

            _receivers.Add(serverId, serveritem);

            InternalThreads.Clear();
            foreach (KeyValuePair <string, ReceiverLog> pair in _receivers)
            {
                InternalThreads.Add(pair.Value.receiver.InternalThread);
            }
        }
    }