java - NIO: OP_READ and not reading all data; does OP_READ remain in ready set? -
imagine socket channel 32kb socket receive buffer.
24kb of data being received , op_read set in ready set , io thread gets notified process incoming data.
normally socketchannel.read called bytebuffer able store content of socket receive buffer.
but question:
what happens when bytebuffer isn't big enough read data,e.g. bytebuffer of 16kb, , therefor 8kb remain in socket receive buffer. op_read removed ready set or op_read remain in ready set long data remains in socket-buffer of socket.
normally socketchannel.read called bytebuffer able store content of socket receive buffer.
no isn't. called bytebuffer large enough receive whatever application ready receive @ time.
what happens when bytebuffer isn't big enough read data,e.g. bytebuffer of 16kb, , therefor 8kb remain in socket receive buffer. op_read removed ready set
no.
or op_read remain in ready set long data remains in socket-buffer of socket.
yes.
Comments
Post a Comment