Close() public method

Close the socket currently listening, and destroy the UDP sender device.
public Close ( ) : void
return void
 void Stop()
 {
     try{
         udp.Close();
         handler.Cancel();
     }catch (System.Exception e) { }
 }
Esempio n. 2
0
    /// <summary>
    /// Make sure the PacketExchange is closed.
    /// </summary>
    ///

    /*
     * ~OSC()
     * {
     * Cancel();
     * //Debug.LogError("~Osc");
     * }
     */
    public void Close()
    {
        //Debug.Log("Osc Cancel start");


        if (OscPacketIO != null && OscPacketIO.IsOpen())
        {
            OscPacketIO.Close();
            OscPacketIO = null;
            print("Closed OSC listener");
        }
    }
Esempio n. 3
0
 private void Cancel()
 {
     if (ReaderRunning)
     {
         ReaderRunning = false;
         ReadThread.Abort();
     }
     if (packetIO != null && packetIO.IsOpen())
     {
         packetIO.Close();
         packetIO = null;
     }
 }
Esempio n. 4
0
 public void Cancel()
 {
     if (ReaderRunning)
     {
         ReaderRunning = false;
         ReadThread.Abort();
     }
     if (OscPacketIO != null && OscPacketIO.IsOpen())
     {
         OscPacketIO.Close();
         OscPacketIO = null;
     }
 }
Esempio n. 5
0
    /// <summary>
    /// Make sure the PacketExchange is closed.
    /// </summary>
    public void Close() {
        if (ReaderRunning) {
            ReaderRunning = false;
            ReadThread.Abort();
        }
        if (OscPacketIO != null && OscPacketIO.IsOpen()) {
            OscPacketIO.Close();
            OscPacketIO = null;
			print("Closed OSC listener");
        }
        if (useRepeater) {
            CancelInvoke("UpdateRepeater");
		}
    }
Esempio n. 6
0
 public void Cancel()
 {
     //Debug.Log("Osc Cancel start");
     if (ReaderRunning)
     {
         ReaderRunning = false;
         ReadThread.Abort();
     }
     if (OscPacketIO != null && OscPacketIO.IsOpen())
     {
         OscPacketIO.Close();
         OscPacketIO = null;
     }
     //Debug.Log("Osc Cancel finished");
 }
Esempio n. 7
0
    /// <summary>
    /// Make sure the PacketExchange is closed.
    /// </summary>
    ///

    /*
     *  ~OSC()
     * {
     *  Cancel();
     *  //Debug.LogError("~Osc");
     * }
     */
    public void Close()
    {
        //Debug.Log("Osc Cancel start");


        if (ReaderRunning)
        {
            ReaderRunning = false;
            ReadThread.Abort();
        }

        if (OscPacketIO != null && OscPacketIO.IsOpen())
        {
            OscPacketIO.Close();
            OscPacketIO = null;
            print("Closed OSC listener");
        }
    }
Esempio n. 8
0
    /// <summary>
    /// Make sure the PacketExchange is closed.
    /// </summary>
    ///

    /*
     * ~OSC()
     * {
     * Cancel();
     * //Debug.LogError("~Osc");
     * }
     */
    public void Close()
    {
        Debug.Log("Closing OSC connection...");

        if (ReaderRunning)
        {
            ReaderRunning = false;
            ReadThread.Abort();
        }

        if (OscPacketIO != null && OscPacketIO.IsOpen())
        {
            OscPacketIO.Close();
            OscPacketIO = null;

            Debug.Log("OSC listener closed");
        }
    }
Esempio n. 9
0
 void OnDisable()
 {
     udp.Close();
 }
Esempio n. 10
0
 void OnApplicationQuit()
 {
     sendMessage("##end##");
     udp.Close();
 }