AsyncSocket's ConnectCallback provide additional preConnect
Summary: Currently, AsyncSocket's `connect` API creates new socket, set various options, bind it to passed argument address and used it for connecting to server. While most of the things are handled inside that single connect routine; sometimes if the caller would like to do few more additional operations before actual connect happens; caller would like to have hold on the underneath used socket. In order to do that additional operation on the socket, this diff provides the facility to provide custom pre-connect hook `preConnect(NetworkSocket fd)` in the `ConnectCallback` which will be invoked just before the actual server connect. Reviewed By: yfeldblum Differential Revision: D15282727 fbshipit-source-id: 5beac55c77a9537ee4f26856dd5f78c5224a1f49
Showing
Please register or sign in to comment