Add writable() to AsyncTransport
authorKevin Chen <kevinch@fb.com>
Thu, 11 May 2017 02:42:00 +0000 (19:42 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 May 2017 02:50:20 +0000 (19:50 -0700)
commitf3bbb0b1faa8f430a41dc2f49b10d56af9851e89
tree7732ba2952770aa56958abb2f672888eabe8d7c1
parentea2c005ea5c31c5b078d2c4b21485b6ed41d1092
Add writable() to AsyncTransport

Summary:
This is useful for checking if it's possible to still write to a transport,
even if its read side is closed (for transports that support half shutdown,
like AsyncSocket). Default implementation just returns true for now (up
to implementers to override).

Reviewed By: yfeldblum

Differential Revision: D4982649

fbshipit-source-id: 0a9a2e2b745ea3db57e9f151f3a8634e1bda2465
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncSocket.h
folly/io/async/AsyncTransport.h
folly/io/async/DecoratedAsyncTransportWrapper.h
folly/io/async/test/AsyncSocketTest2.cpp