mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 08:22:19 +02:00
more windows headaches memset instead of bzero
This commit is contained in:
parent
36f635ed8d
commit
ca4bca7042
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ void runSend(const char* addressOption, int port, int gap, int size) {
|
|||
|
||||
sockfd=socket(AF_INET,SOCK_DGRAM,0);
|
||||
|
||||
bzero(&servaddr,sizeof(servaddr));
|
||||
memset(&servaddr, 0, sizeof(servaddr));
|
||||
servaddr.sin_family = AF_INET;
|
||||
servaddr.sin_addr.s_addr=inet_addr(addressOption);
|
||||
servaddr.sin_port=htons(port);
|
||||
|
@ -107,7 +107,7 @@ void runReceive(const char* addressOption, int port, int gap, int size) {
|
|||
|
||||
sockfd=socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
bzero(&myaddr,sizeof(myaddr));
|
||||
memset(&myaddr, 0, sizeof(myaddr));
|
||||
myaddr.sin_family = AF_INET;
|
||||
myaddr.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||
myaddr.sin_port=htons(port);
|
||||
|
|
Loading…
Reference in a new issue