Skip to content

A sample of ZeroCopyInputStream/ZeroCopyOutputStream to handle a streaming socket using a pre-allocated buffer

License

Notifications You must be signed in to change notification settings

gnobal/protobuf-zero-copy-network-stream-sample

Repository files navigation

protobuf-zero-copy-network-stream-sample

This is a sample of a ZeroCopyInputStream and a ZeroCopyOutputStream to handle a streaming socket using a pre-allocated buffer. This is useful if you have a buffer pool or wish to use an on-stack buffer.

Notes

  1. Logging code is commented out. You better uncomment and use your own logging framework to catch errors.
  2. This code was used in a production server, but currently doesn't have any associated tests. It is provided as is and wihtout any guarantee.

About

A sample of ZeroCopyInputStream/ZeroCopyOutputStream to handle a streaming socket using a pre-allocated buffer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages