0 votes

I have been using PacketPeerUDP successfully to receive text/ascii based packets. But my needs have changed in order to match up with a larger project. The data is sent in I guess binary packets as a struct that contains 6 doubles. I need to receive those 6 doubles and deal with them in Godot. Is this possible?

in Engine by (34 points)

I know this method exist for StreamPeer: http://docs.godotengine.org/en/latest/classes/class_streampeer.html?highlight=StreamPeer#class-streampeer-get-double
But no idea if it's going to work in your case. It probably will if your double is encoded the exact same way on both ends (also beware if the struct is sent as raw memory or serialized in deterministic order).
I don't see a StreamPeerUDP though, perhaps the API is different for this protocol. I'd be curious if someone knows.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.