Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit43647ed

Browse files
committed
Increase buffer size
1 parent6b518db commit43647ed

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎dtmd/include/limits.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#defineMAX_TRANSACTIONS 4096
55

6-
#defineBUFFER_SIZE (64 * 1024)
6+
#defineBUFFER_SIZE (256 * 1024)
77
#defineLISTEN_QUEUE_SIZE 100
88
#defineMAX_STREAMS 4096
99

‎dtmd/src/server.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ bool server_start(server_t server) {
128128
return true;
129129
}
130130

131+
longsent_messages;
132+
longsent_bytes;
133+
131134
staticboolstream_flush(stream_tstream) {
132135
inttosend=stream->output.ready;
133136
if (tosend==0) {
@@ -138,12 +141,14 @@ static bool stream_flush(stream_t stream) {
138141
char*cursor=stream->output.data;
139142
while (tosend>0) {
140143
// repeat sending until we send everything
141-
intsent=send(stream->fd,cursor,tosend,0);
144+
intsent=send(stream->fd,cursor,tosend,0);
142145
if (sent==-1) {
143146
shout("failed to flush the stream\n");
144147
stream->good= false;
145148
return false;
146149
}
150+
sent_messages+=1;
151+
sent_bytes+=sent;
147152
cursor+=sent;
148153
tosend-=sent;
149154
assert(tosend >=0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp