Jump to content
  • Advertisement
Sign in to follow this  
Son of Cain

[java] Modelling Events for Non-Blocking IO

This topic is 4871 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It seems like NIO is being a constant issue on these forums; And yet after suggesting an event-driven modelling for NIO, I get caught in a problem that surely proves that I'm still green on NIO. My current problem is a "MSN-like" application, written with NIO. I made the abstraction of a NIOEvent interface, to be used as the implementation of commands between clients, such as authorization requests, file transfer, and so on. My problem is how to deal with event size - should I split an event into more than one byte buffer (probably the way to go for the file transfer issue), or should I adjust the payload of a single buffer to send all data in only one byte buffer? Well, I think I should be prepared for both, since a message is way smaller than a file. However, what's the best way to deal with this, "code-wise"? Apart from that, does anyone have a (code) suggestion for such abstraction? Thanks for the kindness of reading my post ;) Son Of Cain

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!