0

1)Is Netty's zero-copy work on windows 7?

2)Does anyone have examples of Netty's zero-copy usage for client-server?

3) I have also found an example of zero-copy using FileChannel, what's the defference between netty realization and java.nio.channels.FileChannel realization?

user304371
  • 21
  • 2

1 Answers1

1

Just use DefaultFileRegion and it should work on Linux/MacOS/Windows. This makes internally use of FileChannel..

Something like:

FileRegion region = new DefaultFileRegion(...);
channel.writeAndFlush(region);
Norman Maurer
  • 23,104
  • 2
  • 33
  • 31