1) AFAICS there's no IoSession.sendFile(). I think you mean calling
IoSession.write() with a File or FileChannel object?
2) This is exactly what StreamWriteFilter and FileRegionWriteFilter do.
Once installed you can just call IoSession.write() with an InputStream
object or FileRegion object.
Option 1 is probaby the most performant one. However, I dont think
option 1 will work if you need to process the file data through some
other filter before it's written (e.g. SslFilter). In that case you
shouold go with option 2.
/Niklas
"이희승 (Trustin Lee) <[EMAIL PROTECTED]>" skrev:
Hi Pat,
1) Use IoSession.sendFile()
2) Split the file into multiple 64kb (or bigger) chunks and send them
one by one using WriteFuture.addListener() or messageSent().
HTH,
Pat C wrote:
Hi,
We would like to write a client-server that can send and accept (binary)
attachments. We would like to upload file of sizes from 500KB to 25 MB.
Can someone guide me on the right approach you have taken with any
references to some example code.
Thanks in advance,
Pat