11/*
22 * File : wn_session.h
33 * This file is part of RT-Thread RTOS
4- * COPYRIGHT (C) 2006 - 2018 , RT-Thread Development Team
4+ * COPYRIGHT (C) 2006 - 2022 , RT-Thread Development Team
55 *
66 * This software is dual-licensed: you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
2929
3030#ifdef RT_USING_SAL
3131#include <sys/socket.h>
32- #else
32+ #else
3333#include <lwip/sockets.h>
3434#endif
3535
3636#ifdef __cplusplus
3737extern "C" {
3838#endif
3939
40- #define WEBNET_SESSION_BUFSZ (4 * 1024)
40+ #define WEBNET_SESSION_BUFSZ (4 * 1024)
4141
4242/* close session */
43- #define WEBNET_EVENT_CLOSE (1 << 5)
43+ #define WEBNET_EVENT_CLOSE (1 << 5)
4444/* read session */
45- #define WEBNET_EVENT_READ (1 << 6)
45+ #define WEBNET_EVENT_READ (1 << 6)
4646/* write session */
47- #define WEBNET_EVENT_WRITE (1 << 7)
47+ #define WEBNET_EVENT_WRITE (1 << 7)
4848
4949
5050struct webnet_session_ops
@@ -55,11 +55,11 @@ struct webnet_session_ops
5555
5656enum webnet_session_phase
5757{
58- WEB_PHASE_METHOD = 0 , /* parse method */
59- WEB_PHASE_HEADER , /* handle web request header */
60- WEB_PHASE_QUERY , /* handle web query */
61- WEB_PHASE_RESPONSE , /* handle web response */
62- WEB_PHASE_CLOSE , /* to close session */
58+ WEB_PHASE_METHOD = 0 , /* parse method */
59+ WEB_PHASE_HEADER , /* handle web request header */
60+ WEB_PHASE_QUERY , /* handle web query */
61+ WEB_PHASE_RESPONSE , /* handle web response */
62+ WEB_PHASE_CLOSE , /* to close session */
6363};
6464
6565struct webnet_session
@@ -78,10 +78,10 @@ struct webnet_session
7878 rt_uint16_t buffer_offset ;
7979 rt_uint8_t buffer [WEBNET_SESSION_BUFSZ ];
8080
81- /* session phase */
82- rt_uint32_t session_phase ;
81+ /* session phase */
82+ rt_uint32_t session_phase ;
8383
84- rt_uint32_t session_event_mask ;
84+ rt_uint32_t session_event_mask ;
8585 const struct webnet_session_ops * session_ops ;
8686 rt_uint32_t user_data ;
8787};
0 commit comments