December 22nd, 2012, 08:01 PM
Java TCP/IP NIO: Read a specified chunk of the buffer?
I'm making a NIO TCP/IP server for my game and i'd love to know how to read a specified amount of data from the stream without removing the rest(Like typical IO, eg. s.getInputStream.read(buffer, offset, len)).
For my client it works fine since im using a blocking socket in a seperate thread but as for my server i am at loss.
Any answers are appreciated! Thanks in advance and let me know if there is anything else you'd like to know!
Tags for this Thread
Click Here to Expand Forum to Full Width