Frequently Asked Questions
On this page you can find a few frequently asked questions (and anwers!) that might help you back on track with the OOCSI system. Often, the solution is to ask yourself a few pointed questions (see first Q&A), in other cases, it is good to know about certain assumptions or default behavior in the OOCSI system.
Why is my client not connecting to the server?
If the server is on the Internet, are you connected to the Internet? If the server is on a local Wifi, are you connected to that local Wifi? If you are running your own server on your computer, is it still running? Perhaps restart it.
Still nothing? Check this: OOCSI uses a communication protocol on port 4444 (default, can be changed on the server). It might be that your Wifi network or Internet Provider blocks this port. Probably it is best to ask an administrator about this.
Why was my client rejected by the server?
Probably you just reconnected after an earlier connection was ended abruptly. It could be that the server still remembers that connection and your client handle. Just wait for 2 minutes before reconnecting or choose a different handle for the time being. The newest server versions will resolve this case automatically, so this issue will disappear in the future.
Can I use the same OOCSI client for sending and receiving?
Yes, please do.
Why can my message not be received?
Please check the following points:
- Did you actually send the message in your code?
- Are both clients connected to the same OOCSI server?
- Is the receiving client actually subscribed to the channel that the message went to?
- Does the receiving client have a function registered to handle the incoming message?
If all points are checked, you can try to insert logging statements (for instance, “println(…); in Processing”) to check where the sending or receiving fails.
Why am I receiving a LOT of messages (and they don’t stop) although only one message was sent?
Usually, the problem is that you receive the single message once, but you process it many times inside your own code, often because you are running the processing function in a loop (for instance, “draw” in Processing or “loop” in ESP).
Why am I receiving several messages with missing data, although altogether the data is complete?
Probably you are doing something like this:
oocsi.data("key1", 3).send();
oocsi.data("key2", 43.21).send();
oocsi.data("key3", "cucumber").send();`
Always send the data that belongs together in a single message, like so:
oocsi.data("key1", 3).data("key2", 43.21).data("key3", "cucumber").send();
Why can my client not receive its own messages to a channel?
The OOCSI system prevents that a message echo’s back to the client that sent the message, even if the client is subscribed to the channel that the message was sent to. We designed this feature to avoid all kinds of communication problems, and this has worked well so far (8 years and counting). If you would like to receive your message back, you can send it to the “echo” client and it will send the message directly back to you:
// example for Processing
// message is sent to echo client
oocsi.channel("echo").data("mydata", 3.1415).send();
// you will receive this message back