J
Jordi
Hello
I need an expert's advice and clear some concepts.
I have a NIO server and a NIO client.
I have a big muddle with all this of TCP UDP and NIO.
My NIO server uses ByteBuffers to send objects converted to bytes.
So it's quite eficient. What it must do is to send chat and java
objects that encapsulate some data.
I am doing a kind of game and I need to send data of position and
orientation of some characters that move in a 3d scenario. I don't
need all positions, I will send some, not all. When people receive
them in their clients, I use dead reckoning to move the people
characters.
But if there's many people in the 3d place moving, I will need to send
a huge amount of data. That's why I used NIO.
I read that was done with UDP Datagrams in the past.
My questions are:
- Do I need UDP Datagrams if I use NIO (sending Objects as bytes)?
- Can UDP used with NIO? Or it needs another connection?
- What has to do TCP and UDP with NIO ?
Sorry for the stupid questions. Just asking to clarify and get advice.
Thanks
Jordi
I need an expert's advice and clear some concepts.
I have a NIO server and a NIO client.
I have a big muddle with all this of TCP UDP and NIO.
My NIO server uses ByteBuffers to send objects converted to bytes.
So it's quite eficient. What it must do is to send chat and java
objects that encapsulate some data.
I am doing a kind of game and I need to send data of position and
orientation of some characters that move in a 3d scenario. I don't
need all positions, I will send some, not all. When people receive
them in their clients, I use dead reckoning to move the people
characters.
But if there's many people in the 3d place moving, I will need to send
a huge amount of data. That's why I used NIO.
I read that was done with UDP Datagrams in the past.
My questions are:
- Do I need UDP Datagrams if I use NIO (sending Objects as bytes)?
- Can UDP used with NIO? Or it needs another connection?
- What has to do TCP and UDP with NIO ?
Sorry for the stupid questions. Just asking to clarify and get advice.
Thanks
Jordi