forked from cory/tildefriends
Poking at TCP binds from Haiku.
This commit is contained in:
@ -2843,13 +2843,14 @@ void tf_ssb_server_open(tf_ssb_t* ssb, int port)
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_port = htons(port);
|
||||
addr.sin_addr.s_addr = INADDR_ANY;
|
||||
if (uv_tcp_bind(&ssb->server, (struct sockaddr*)&addr, 0) != 0)
|
||||
int status = uv_tcp_bind(&ssb->server, (struct sockaddr*)&addr, 0);
|
||||
if (status != 0)
|
||||
{
|
||||
tf_printf("uv_tcp_bind failed\n");
|
||||
tf_printf("%s:%d: uv_tcp_bind failed: %s\n", __FILE__, __LINE__, uv_strerror(status));
|
||||
return;
|
||||
}
|
||||
|
||||
int status = uv_listen((uv_stream_t*)&ssb->server, SOMAXCONN, _tf_ssb_on_connection);
|
||||
status = uv_listen((uv_stream_t*)&ssb->server, SOMAXCONN, _tf_ssb_on_connection);
|
||||
if (status != 0)
|
||||
{
|
||||
tf_printf("uv_listen failed: %s\n", uv_strerror(status));
|
||||
|
Reference in New Issue
Block a user