Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question Related to the Code #39

Open
robertojrojas opened this issue Apr 14, 2020 · 0 comments
Open

Question Related to the Code #39

robertojrojas opened this issue Apr 14, 2020 · 0 comments

Comments

@robertojrojas
Copy link

I've been studying this code for a few days to learn more about network programming. I've learned some good things, Thanks!

My question is
I've seen this use of memset in other code and sample, but I'm curious as to why cast the struct to (char *)
instead of just memset(&serv_addr, 0, sa_size)

memset((char*)&serv_addr, 0, sa_size);

Thanks in advance,

  • Roberto
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

No branches or pull requests

1 participant