Avoid extra copying of sockaddr storage; pass by reference. #1834

This commit is contained in:
dmiller 2019-12-29 15:52:58 +00:00
parent 3618f48b89
commit ee95fa8d30
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@ struct sockaddr_storage NEPContext::getAddress(){
} /* End of getAddress() */
int NEPContext::setAddress(struct sockaddr_storage a){
int NEPContext::setAddress(const struct sockaddr_storage &a){
this->clnt_addr=a;
return OP_SUCCESS;
} /* End of setAddress() */

View file

@ -218,7 +218,7 @@ class NEPContext {
int setIdentifier(clientid_t clnt);
clientid_t getIdentifier();
int setAddress(struct sockaddr_storage a);
int setAddress(const struct sockaddr_storage &a);
struct sockaddr_storage getAddress();
int setNsockIOD(nsock_iod iod);