microsoft / microsoft/ntttcp-for-linux
Question Related to the Code
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 426
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
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)
Thanks in advance,
- Roberto
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/udpstream.c around line 44 and inspect the memset call involving serv_addr and sa_size. Read the relevant C memset declaration and surrounding code to determine what explanation is needed; done means providing a clear answer to why the cast is used, rather than changing the benchmark.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100