};
typedef enum isc__netievent_type {
- netievent_tlssend,
netievent_tlsconnect,
netievent_tlsdobio,
* ahead of data (two bytes (16 bit) in big-endian format).
*/
-void
-isc__nm_async_tlssend(isc__networker_t *worker, isc__netievent_t *ev0);
-
void
isc__nm_async_tlsdobio(isc__networker_t *worker, isc__netievent_t *ev0);
NETIEVENT_SOCKET_HTTP_EPS_TYPE(httpendpoints);
#endif /* HAVE_LIBNGHTTP2 */
-NETIEVENT_SOCKET_REQ_TYPE(tlssend);
-
NETIEVENT_SOCKET_REQ_RESULT_TYPE(sendcb);
NETIEVENT_SOCKET_TYPE(streamdnsread);
NETIEVENT_SOCKET_HTTP_EPS_DECL(httpendpoints);
#endif /* HAVE_LIBNGHTTP2 */
-NETIEVENT_SOCKET_REQ_DECL(tlssend);
-
NETIEVENT_SOCKET_REQ_RESULT_DECL(sendcb);
NETIEVENT_SOCKET_DECL(streamdnsread);
isc__networker_t *worker = ievent->worker;
switch (ievent->type) {
- NETIEVENT_CASE(tlssend);
NETIEVENT_CASE(tlsdobio);
#if HAVE_LIBNGHTTP2
NETIEVENT_CASE(httpsend);
NETIEVENT_SOCKET_HTTP_EPS_DEF(httpendpoints);
#endif /* HAVE_LIBNGHTTP2 */
-NETIEVENT_SOCKET_REQ_DEF(tlssend);
-
NETIEVENT_SOCKET_DEF(streamdnsread);
NETIEVENT_SOCKET_HANDLE_DEF(streamdnscancel);
return (result);
}
-void
-isc__nm_async_tlssend(isc__networker_t *worker, isc__netievent_t *ev0) {
- isc__netievent_tlssend_t *ievent = (isc__netievent_tlssend_t *)ev0;
- isc_nmsocket_t *sock = ievent->sock;
- isc__nm_uvreq_t *req = ievent->req;
+static void
+tls_send_direct(void *arg) {
+ isc__nm_uvreq_t *req = arg;
REQUIRE(VALID_UVREQ(req));
- REQUIRE(sock->tid == isc_tid());
- UNUSED(worker);
+ isc_nmsocket_t *sock = req->sock;
- ievent->req = NULL;
+ REQUIRE(VALID_NMSOCK(sock));
+ REQUIRE(sock->tid == isc_tid());
if (inactive(sock)) {
req->cb.send(req->handle, ISC_R_CANCELED, req->cbarg);
static void
tls_send(isc_nmhandle_t *handle, const isc_region_t *region, isc_nm_cb_t cb,
void *cbarg, const bool dnsmsg) {
- isc__netievent_tlssend_t *ievent = NULL;
isc__nm_uvreq_t *uvreq = NULL;
isc_nmsocket_t *sock = NULL;
*(uint16_t *)uvreq->tcplen = htons(region->length);
}
- /*
- * We need to create an event and pass it using async channel
- */
- ievent = isc__nm_get_netievent_tlssend(sock->worker, sock, uvreq);
- isc__nm_enqueue_ievent(sock->worker, (isc__netievent_t *)ievent);
+ isc_async_run(sock->worker->loop, tls_send_direct, uvreq);
}
void