File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ int swReactorThread_send(swSendData *_send)
183
183
swConnection_close (serv , fd , _send -> info .type == SW_CLOSE_INITIATIVE ? 0 : 1 );
184
184
return SW_OK ;
185
185
}
186
+ #ifdef SW_REACTOR_SYNC_SEND
186
187
//Direct send
187
188
else if (_send -> info .type != SW_EVENT_SENDFILE )
188
189
{
@@ -208,6 +209,7 @@ int swReactorThread_send(swSendData *_send)
208
209
goto buffer_send ;
209
210
}
210
211
}
212
+ #endif
211
213
//Buffer send
212
214
else
213
215
{
Original file line number Diff line number Diff line change 80
80
#define SW_REACTOR_TIMEO_USEC 0
81
81
#define SW_REACTOR_SCHEDULE 2 //连接分配模式: 1轮询分配, 2按FD取摸固定分配, 3根据连接数进行调度
82
82
#define SW_REACTOR_MAXEVENTS 4096
83
- #define SW_REACTOR_SYNC_SEND //sync send
83
+ // #define SW_REACTOR_SYNC_SEND //direct send
84
84
#define SW_SCHEDULE_INTERVAL 32 //平均调度的间隔次数,减少运算量
85
85
86
86
#define SW_QUEUE_SIZE 100 //缩减版的RingQueue,用在线程模式下
You can’t perform that action at this time.
0 commit comments