added conditionals for SOL_SCTP
This commit is contained in:
parent
c0fc2e07d6
commit
477dc278c2
@ -223,7 +223,7 @@ static qse_sck_hnd_t open_server_socket (int proto, const qse_nwad_t* bindnwad)
|
|||||||
bind_ok:
|
bind_ok:
|
||||||
if (proto == IPPROTO_SCTP)
|
if (proto == IPPROTO_SCTP)
|
||||||
{
|
{
|
||||||
#if 1
|
#if defined(SOL_SCTP)
|
||||||
struct sctp_initmsg im;
|
struct sctp_initmsg im;
|
||||||
struct sctp_paddrparams hb;
|
struct sctp_paddrparams hb;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ bind_ok:
|
|||||||
hb.spp_pathmaxrxt = 1;
|
hb.spp_pathmaxrxt = 1;
|
||||||
|
|
||||||
if (setsockopt (s, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
|
if (setsockopt (s, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (listen (s, 99) <= -1)
|
if (listen (s, 99) <= -1)
|
||||||
{
|
{
|
||||||
|
@ -730,9 +730,9 @@ static qse_sck_hnd_t open_udp_socket (qse_httpd_t* httpd, int domain, int type,
|
|||||||
|
|
||||||
if (set_socket_nonblock (httpd, fd, 1) <= -1) goto oops;
|
if (set_socket_nonblock (httpd, fd, 1) <= -1) goto oops;
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (proto == IPPROTO_SCTP)
|
if (proto == IPPROTO_SCTP)
|
||||||
{
|
{
|
||||||
|
#if defined(SOL_SCTP)
|
||||||
struct sctp_initmsg im;
|
struct sctp_initmsg im;
|
||||||
struct sctp_paddrparams hb;
|
struct sctp_paddrparams hb;
|
||||||
|
|
||||||
@ -749,8 +749,8 @@ static qse_sck_hnd_t open_udp_socket (qse_httpd_t* httpd, int domain, int type,
|
|||||||
hb.spp_pathmaxrxt = 1;
|
hb.spp_pathmaxrxt = 1;
|
||||||
|
|
||||||
if (setsockopt (fd, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
|
if (setsockopt (fd, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user