Skip to content

Added bind for local TCP#4

Open
dheerajd5 wants to merge 1 commit into
dormando:mainfrom
dheerajd5:main
Open

Added bind for local TCP#4
dheerajd5 wants to merge 1 commit into
dormando:mainfrom
dheerajd5:main

Conversation

@dheerajd5

Copy link
Copy Markdown

This is addressing issue #1271 in memcached.

The memcached library will also need changes where mcmc_connect is used to match the updated parameter list.
I thought it would better to post a PR here first and discuss before I move on to try and integrate into memcached code.

@dormando

dormando commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks for this! I need to double check it before merging, but I'll leave a quick comment

Comment thread mcmc.c Outdated
}
}

if(source != NULL ){

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please match style to the rest of the code

Comment thread mcmc.h Outdated
size_t mcmc_min_buffer_size(int options);
int mcmc_parse_buf(const char *buf, size_t read, mcmc_resp_t *r);
int mcmc_connect(void *c, char *host, char *port, int options);
int mcmc_connect(void *c, char *source, char *host, char *port, int options);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be okay since I've no public ABI on this library yet, but normally the process is like:

mcmc_connect_with_source(new function params) (idk about the name exactly, but something like this)
#define mcmc_connect(old params) mcmc_connect_with_source(new params, NULL source)

reduces downstream burden.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put it as mcmc_connect_ex (extended) , I thought it would better suit the function in the future.
Just let me know if you want it as mcmc_connect_source then I'll put up a commit for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants