microsoft / ntttcp-for-linux

A Linux network throughput multiple-thread benchmark tool.
https://github.com/Microsoft/ntttcp-for-linux
MIT License
389 stars 92 forks source link

Question Related to the Code #39

Open robertojrojas opened 4 years ago

robertojrojas commented 4 years ago

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)`**

https://github.com/microsoft/ntttcp-for-linux/blob/14705f17876d4237db324944c37a650d6f03506d/src/udpstream.c#L44

Thanks in advance,