Hi,
Why isn’t InputEvent serializable? How can I send it over a network?
Hi,
Why isn’t InputEvent serializable? How can I send it over a network?
You can write your own Serializer subclass for InputEvent or you can make your own serializable event class.
It’s unusual to send input events directly as it’s not really proper networking. So it’s never come up before.
Thank you for your reply.
What do you mean by my own serializable event class?
Make your own MyEvent.java or whatever. Put your own class in it. Mark it as @Serializable and register it with the Serializer.
Sending input events directly over the network is almost never the right way to do things. You almost always want to abstract it into something else… and you certainly don’t want to send every little event 60 times a second.