EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.81k stars 415 forks source link

Large buffer to server #148

Closed wlkjlc closed 5 years ago

wlkjlc commented 5 years ago

The Client class is created each time transmission is done, and it is possible to set the buffer according to the context. However, since the Server class is always active, you need to have a buffer that matches the largest possible message. If you set a huge buffer to Server, is there performance loss when processing small messages? Should I separate Server with huge messages and small messages if so?

NathanSweet commented 5 years ago

Setting a large buffer doesn't hurt performance, it just uses more memory.

Note the mailing list is better for discussion.