use address for tcp:// and tcp6:// and vsock://

This commit is contained in:
Jay Sorg
2019-07-01 17:56:50 -07:00
parent f42e38125e
commit ee65ccb31d
4 changed files with 73 additions and 26 deletions
+3 -3
View File
@@ -875,7 +875,7 @@ trans_listen_address(struct trans *self, char *port, const char *address)
g_tcp_set_non_blocking(self->sck);
if (g_sck_vsock_bind(self->sck, port) == 0)
if (g_sck_vsock_bind_address(self->sck, port, address) == 0)
{
if (g_tcp_listen(self->sck) == 0)
{
@@ -893,7 +893,7 @@ trans_listen_address(struct trans *self, char *port, const char *address)
return 1;
}
g_tcp_set_non_blocking(self->sck);
if (g_tcp4_bind(self->sck, port, address) == 0)
if (g_tcp4_bind_address(self->sck, port, address) == 0)
{
if (g_tcp_listen(self->sck) == 0)
{
@@ -911,7 +911,7 @@ trans_listen_address(struct trans *self, char *port, const char *address)
return 1;
}
g_tcp_set_non_blocking(self->sck);
if (g_tcp6_bind(self->sck, port, address) == 0)
if (g_tcp6_bind_address(self->sck, port, address) == 0)
{
if (g_tcp_listen(self->sck) == 0)
{