|
|
|
@ -155,7 +155,7 @@ void grpc_tcp_server_destroy(grpc_tcp_server *s, |
|
|
|
|
|
|
|
|
|
/* Prepare (bind) a recently-created socket for listening. */ |
|
|
|
|
static int prepare_socket(SOCKET sock, const struct sockaddr *addr, |
|
|
|
|
int addr_len) { |
|
|
|
|
size_t addr_len) { |
|
|
|
|
struct sockaddr_storage sockname_temp; |
|
|
|
|
socklen_t sockname_len; |
|
|
|
|
|
|
|
|
@ -168,7 +168,7 @@ static int prepare_socket(SOCKET sock, const struct sockaddr *addr, |
|
|
|
|
goto error; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (bind(sock, addr, addr_len) == SOCKET_ERROR) { |
|
|
|
|
if (bind(sock, addr, (int)addr_len) == SOCKET_ERROR) { |
|
|
|
|
char *addr_str; |
|
|
|
|
char *utf8_message = gpr_format_message(WSAGetLastError()); |
|
|
|
|
grpc_sockaddr_to_string(&addr_str, addr, 0); |
|
|
|
@ -354,7 +354,7 @@ static void on_accept(void *arg, int from_iocp) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, |
|
|
|
|
const struct sockaddr *addr, int addr_len) { |
|
|
|
|
const struct sockaddr *addr, size_t addr_len) { |
|
|
|
|
server_port *sp; |
|
|
|
|
int port; |
|
|
|
|
int status; |
|
|
|
@ -401,7 +401,7 @@ static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, |
|
|
|
|
int addr_len) { |
|
|
|
|
size_t addr_len) { |
|
|
|
|
int allocated_port = -1; |
|
|
|
|
unsigned i; |
|
|
|
|
SOCKET sock; |
|
|
|
|