| 2159 | } |
| 2160 | |
| 2161 | AuthContext* Socket::mutable_auth_context() { |
| 2162 | if (_auth_context != NULL) { |
| 2163 | LOG(FATAL) << "Impossible! This function is supposed to be called " |
| 2164 | "only once when verification succeeds in server side"; |
| 2165 | return NULL; |
| 2166 | } |
| 2167 | _auth_context = new(std::nothrow) AuthContext(); |
| 2168 | CHECK(_auth_context); |
| 2169 | return _auth_context; |
| 2170 | } |
| 2171 | |
| 2172 | int Socket::OnInputEvent(void* user_data, uint32_t events, |
| 2173 | const bthread_attr_t& thread_attr) { |
no outgoing calls