diff --git a/qse/include/qse/si/aio-sck.h b/qse/include/qse/si/aio-sck.h index 496fb582..69ca6dcb 100644 --- a/qse/include/qse/si/aio-sck.h +++ b/qse/include/qse/si/aio-sck.h @@ -84,7 +84,6 @@ struct QSE_AIO_PACKED qse_aio_ip6addr_t }; typedef struct qse_aio_ip6addr_t qse_aio_ip6addr_t; - struct QSE_AIO_PACKED qse_aio_ethhdr_t { qse_uint8_t dest[QSE_AIO_ETHADDR_LEN]; diff --git a/qse/include/qse/si/aio.h b/qse/include/qse/si/aio.h index 6afdb0a6..638c9c01 100644 --- a/qse/include/qse/si/aio.h +++ b/qse/include/qse/si/aio.h @@ -230,7 +230,7 @@ struct qse_aio_wq_t #define QSE_AIO_DEV_HEADERS \ qse_aio_t* aio; \ - qse_size_t dev_size; \ + qse_size_t dev_size; \ int dev_capa; \ qse_aio_dev_mth_t* dev_mth; \ qse_aio_dev_evcb_t* dev_evcb; \ @@ -295,9 +295,9 @@ extern "C" { #endif QSE_EXPORT qse_aio_t* qse_aio_open ( - qse_mmgr_t* mmgr, - qse_size_t xtnsize, - qse_size_t tmrcapa, /**< initial timer capacity */ + qse_mmgr_t* mmgr, + qse_size_t xtnsize, + qse_size_t tmrcapa, /**< initial timer capacity */ qse_aio_errnum_t* errnum ); @@ -330,10 +330,10 @@ QSE_EXPORT void qse_aio_stop ( QSE_EXPORT qse_aio_dev_t* qse_aio_makedev ( qse_aio_t* aio, - qse_size_t dev_size, + qse_size_t dev_size, qse_aio_dev_mth_t* dev_mth, qse_aio_dev_evcb_t* dev_evcb, - void* make_ctx + void* make_ctx ); QSE_EXPORT void qse_aio_killdev ( @@ -351,12 +351,12 @@ QSE_EXPORT int qse_aio_dev_watch ( qse_aio_dev_t* dev, qse_aio_dev_watch_cmd_t cmd, /** 0 or bitwise-ORed of #QSE_AIO_DEV_EVENT_IN and #QSE_AIO_DEV_EVENT_OUT */ - int events + int events ); QSE_EXPORT int qse_aio_dev_read ( qse_aio_dev_t* dev, - int enabled + int enabled ); /** @@ -379,10 +379,10 @@ QSE_EXPORT int qse_aio_dev_write ( QSE_EXPORT int qse_aio_dev_timedwrite ( qse_aio_dev_t* dev, - const void* data, + const void* data, qse_aio_iolen_t len, - const qse_ntime_t* tmout, - void* wrctx, + const qse_ntime_t* tmout, + void* wrctx, const qse_aio_devaddr_t* dstaddr ); @@ -424,7 +424,7 @@ QSE_EXPORT qse_aio_tmrjob_t* qse_aio_gettmrjob ( QSE_EXPORT int qse_aio_gettmrjobdeadline ( qse_aio_t* aio, qse_aio_tmridx_t index, - qse_ntime_t* deadline + qse_ntime_t* deadline ); /* ========================================================================= */ diff --git a/qse/lib/si/aio-sck.c b/qse/lib/si/aio-sck.c index f17b745c..a4f2b983 100644 --- a/qse/lib/si/aio-sck.c +++ b/qse/lib/si/aio-sck.c @@ -87,7 +87,7 @@ void qse_aio_closeasyncsck (qse_aio_t* aio, qse_aio_sckhnd_t sck) int qse_aio_makesckasync (qse_aio_t* aio, qse_aio_sckhnd_t sck) { - return qse_aio_makesyshndasync (aio, (qse_aio_syshnd_t)sck); + return qse_aio_makesyshndasync(aio, (qse_aio_syshnd_t)sck); } qse_aio_sckhnd_t qse_aio_openasyncsck (qse_aio_t* aio, int domain, int type, int proto) @@ -451,7 +451,7 @@ static int dev_sck_make_client (qse_aio_dev_t* dev, void* ctx) qse_aio_dev_sck_t* rdev = (qse_aio_dev_sck_t*)dev; qse_aio_syshnd_t* sck = (qse_aio_syshnd_t*)ctx; - /* nothing special is done here except setting the sock et handle. + /* nothing special is done here except setting the socket handle. * most of the initialization is done by the listening socket device * after a client socket has been created. */ @@ -1399,7 +1399,7 @@ static int dev_evcb_sck_ready_stateful (qse_aio_dev_t* dev, int events) qse_aio_scklen_t len; len = QSE_SIZEOF(errcode); - if (getsockopt (rdev->sck, SOL_SOCKET, SO_ERROR, (char*)&errcode, &len) == -1) + if (getsockopt(rdev->sck, SOL_SOCKET, SO_ERROR, (char*)&errcode, &len) == -1) { /* the error number is set to the socket error code. * errno resulting from getsockopt() doesn't reflect the actual diff --git a/qse/samples/si/aio01.c b/qse/samples/si/aio01.c index ce382e5a..0894c0bb 100644 --- a/qse/samples/si/aio01.c +++ b/qse/samples/si/aio01.c @@ -520,7 +520,7 @@ int main () SSL_library_init (); #endif - aio = qse_aio_open (QSE_MMGR_GETDFL(), 0, 512, QSE_NULL); + aio = qse_aio_open(QSE_MMGR_GETDFL(), 0, 512, QSE_NULL); if (!aio) { printf ("Cannot open aio\n"); @@ -561,7 +561,7 @@ int main () tcp_make.on_write = tcp_sck_on_write; tcp_make.on_read = tcp_sck_on_read; tcp_make.on_disconnect = tcp_sck_on_disconnect; - tcp[0] = qse_aio_dev_sck_make (aio, QSE_SIZEOF(tcp_server_t), &tcp_make); + tcp[0] = qse_aio_dev_sck_make(aio, QSE_SIZEOF(tcp_server_t), &tcp_make); if (!tcp[0]) { printf ("Cannot make tcp\n"); @@ -581,7 +581,7 @@ int main () qse_inittime (&tcp_conn.connect_tmout, 5, 0); tcp_conn.on_connect = tcp_sck_on_connect; tcp_conn.options = QSE_AIO_DEV_SCK_CONNECT_SSL; - if (qse_aio_dev_sck_connect (tcp[0], &tcp_conn) <= -1) + if (qse_aio_dev_sck_connect(tcp[0], &tcp_conn) <= -1) { printf ("qse_aio_dev_sck_connect() failed....\n"); /* carry on regardless of failure */ @@ -594,7 +594,7 @@ int main () tcp_make.on_read = tcp_sck_on_read; tcp_make.on_disconnect = tcp_sck_on_disconnect; - tcp[1] = qse_aio_dev_sck_make (aio, QSE_SIZEOF(tcp_server_t), &tcp_make); + tcp[1] = qse_aio_dev_sck_make(aio, QSE_SIZEOF(tcp_server_t), &tcp_make); if (!tcp[1]) { printf ("Cannot make tcp\n");