void OnApplicationQuit() { if (server != null) { server.Close(); } }
public void Open(int port) { #if UNITY_EDITOR if (PlayerSettings.runInBackground == false) { Debug.LogWarning("Recommend PlayerSettings > runInBackground = true"); } #endif if (_server != null) { _server.Close(); } _server = new OSCServer(port); _server.SleepMilliseconds = 0; _server.PacketReceivedEvent += didRecievedEvent; }
public override void Stop() { if (server != null) { server.Close(); } }
// EVENTS void OnDestroy() { if (_oscServer != null) { _oscServer.Close(); _oscServer = null; } }
private void stopService() { if (m_server != null) { m_server.Close(); m_server = null; } }
void Disconnect() { if (server != null) { //Debug.Log("Disconnecting"); server.Close(); server = null; } }
void OnDestroy() { if (client != null) { client.Close(); } if (server != null) { server.Close(); } }
public void Connect() { Debug.Log("Connecting to port " + localPort); try { if (server != null) { server.Close(); } server = new OSCServer(localPort); server.PacketReceivedEvent += packetReceived; server.Connect(); isConnected = true; } catch (Exception) { Debug.Log("Error with port " + localPort); isConnected = false; } }
public bool RestartLocalServer() { if (server != null) { server.Close(); Log("closing server"); } server = new OSCServer(listenPort); server.PacketReceivedEvent += (server, packet) => { lock (recievePacketQueue) { recievePacketQueue.Enqueue(packet); } }; return(true); }
bool StopAllServers() { if (m_Server != null) { if (m_Server.UDPClient != null) { m_Server.Close(); } } else { print("No servers found"); return(false); } print("OSC: Server closed"); return(true); }
void OnDestroy() { server.Close(); }
void OnApplicationQuit() { server.Close(); }
void OnApplicationQuit() { // deinit OSC server.Close(); }
public void Finish() { myServer.Close(); }
public static void OnQuit() { _OSCServer.Close(); }
/// <summary> /// /// </summary> private void Quit() { _server.Close(); }