sin->sin_port = htons(port);
if (inet_pton(AF_INET, server, &sin->sin_addr) != 1) {
rpc_set_error(rpc, "Not a valid server ip address");
sin->sin_port = htons(port);
if (inet_pton(AF_INET, server, &sin->sin_addr) != 1) {
rpc_set_error(rpc, "Not a valid server ip address");