Xojo Raspberry Socket

Hello,
Has anybody experience with sockets UDP or TCP? Which one is better to use with Raspberry? Or any examples?
I want to run my Xojo App on my Laptop and control some sensors which are connected to the Raspberry.

Sockets should just work nice.
Any problems you see?

except maybe a firewall blocking you.

TCP? No I’ve just never worked with sockets.

For an easy implementation, and if you are going to use Xojo on both ends, use the EasyTCPSocket class. Internally uses a TCP connection.

Thanks. I’m not using Xojo on both sides. It’s planned to use Xojo only on my Windows Laptop and on the other side on the Raspberry a Python script.

Well, then you cant use the EasyTCPSocket. To use a TCP conection you have to define your own protocol.

Or if you have more time to learn some new things, what I do in this cases is to use MQTT

What is MQTT? Is this something that can be used with Xojo?

https://mqtt.org/

Is there a Xojo MQTT class or library available?
In the meantime i found a websocket class for Xojo.

CURL may have MQTT support, so you could use MBS Xojo CURL Plugin maybe.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.