NBD NettyFrom SPCoastFull maven project source code: NBD implemented with Netty (gzip'd tar file) Apache Open Source License. (See also: NBD implemented with Apache Mina) Starting at the top, the Server simply parses command line arguments, instantiates the protocol stack and binds it to a port. I used the params Map to pass the command line arguments to the session handler.
Next comes the business logic in the Handler - get READ and WRITE commands from the Linux Kernel via a TCP/IP socket and actually read and write blocks from a file. The "file" could be a real disk drive or it could be a file created just for that reason:
The Request and Response objects are POJOs - plain old Java Objects that mimic the Linux "C" structs...
and
and
|
