made ssl selective in main.c

This commit is contained in:
hyung-hwan 2019-04-12 03:13:07 +00:00
parent 2ec12d96eb
commit 265be307cd
3 changed files with 5 additions and 2 deletions

View File

@ -751,9 +751,12 @@ int main (int argc, char* argv[])
memset (&tcp_bind, 0, MIO_SIZEOF(tcp_bind));
mio_sckaddr_initforip4 (&tcp_bind.localaddr, 1235, MIO_NULL);
tcp_bind.options = MIO_DEV_SCK_BIND_REUSEADDR | /*MIO_DEV_SCK_BIND_REUSEPORT |*/ MIO_DEV_SCK_BIND_SSL;
tcp_bind.options = MIO_DEV_SCK_BIND_REUSEADDR /*| MIO_DEV_SCK_BIND_REUSEPORT |*/;
#if defined(USE_SSL)
tcp_bind.options |= MIO_DEV_SCK_BIND_SSL;
tcp_bind.ssl_certfile = "localhost.crt";
tcp_bind.ssl_keyfile = "localhost.key";
#endif
MIO_INIT_NTIME (&tcp_bind.accept_tmout, 5, 1);
if (mio_dev_sck_bind(tcp[2], &tcp_bind) <= -1)

View File

@ -1767,3 +1767,4 @@ mio_uint16_t mio_checksumip (const void* hdr, mio_oow_t len)
return (mio_uint16_t)~sum;
}

View File

@ -596,7 +596,6 @@ MIO_EXPORT mio_uint16_t mio_checksumip (
mio_oow_t len
);
#ifdef __cplusplus
}
#endif