We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello!
For my android sketch I need to disconnect from my server once the app is put in the background, but I cant find documentation on a disconnect function for ocsP5. Does anybody know of something I could use?
NOTE: I tried changing the server ip to null once I want to disconnect but that doesn't seem to be working
Answers
@schotsl===
i am not sure but it seems to me that there is a disconnect() method and a stop() method for ocsP5
@akenaton Yeah I also found some reference to disconnect() but I have no idea on how to use it
@schotsl===
i would try something like that:
OscP5 oscP5;
oscP5.disconnect();
@akenaton It does more than I've been able to achieve my self so thanks for that :) but I get this error,
The function "disconnect()" expects parameters like: "disconnect(NetAddress)"
but when I put the netaddress of the server I'm connected to the function doesn't actually do anything and when I use the stop function
oscP5tcpClient.stop();
the console prints out
### [2017/10/13 13:48:45] PROCESS @ OscP5 stopped.
but it keeps sending data to the server anyway.