diff options
author | dormando <dormando@rydia.net> | 2022-08-06 22:53:56 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-08-24 22:32:40 -0700 |
commit | 2bdf0ec3c8d89d7b75cb8ba7f1290cd937595669 (patch) | |
tree | 5d0c0a4222b99237b2490d4bb082876c8a96a43d /thread.c | |
parent | acb89505d3361d025be112a958a0c45ece0135fd (diff) | |
download | memcached-2bdf0ec3c8d89d7b75cb8ba7f1290cd937595669.tar.gz |
core: add tagging to listener sockets
-l tag[asdfasdf]:0.0.0.0:11211
not presently used for anything outside of the proxy code.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -53,6 +53,7 @@ struct conn_queue_item { enum conn_queue_item_modes mode; conn *c; void *ssl; + uint64_t conntag; io_pending_t *io; // IO when used for deferred IO handling. STAILQ_ENTRY(conn_queue_item) i_next; }; @@ -567,7 +568,7 @@ static void thread_libevent_process(evutil_socket_t fd, short which, void *arg) case queue_new_conn: c = conn_new(item->sfd, item->init_state, item->event_flags, item->read_buffer_size, item->transport, - me->base, item->ssl); + me->base, item->ssl, item->conntag); if (c == NULL) { if (IS_UDP(item->transport)) { fprintf(stderr, "Can't listen for events on UDP socket\n"); @@ -713,7 +714,8 @@ select: * of an incoming connection. */ void dispatch_conn_new(int sfd, enum conn_states init_state, int event_flags, - int read_buffer_size, enum network_transport transport, void *ssl) { + int read_buffer_size, enum network_transport transport, void *ssl, + uint64_t conntag) { CQ_ITEM *item = NULL; LIBEVENT_THREAD *thread; @@ -737,6 +739,7 @@ void dispatch_conn_new(int sfd, enum conn_states init_state, int event_flags, item->transport = transport; item->mode = queue_new_conn; item->ssl = ssl; + item->conntag = conntag; MEMCACHED_CONN_DISPATCH(sfd, (int64_t)thread->thread_id); notify_worker(thread, item); |