/[tewi]/Server/server.c
ViewVC logotype

Diff of /Server/server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.8 by nishi, Sun Oct 27 23:58:24 2024 UTC Revision 1.10 by nishi, Sun Nov 3 06:16:48 2024 UTC
# Line 344  void _tw_process_page(SSL* ssl, int sock Line 344  void _tw_process_page(SSL* ssl, int sock
344          while(1) {          while(1) {
345                  if(f != NULL) {                  if(f != NULL) {
346                          char buffer[512];                          char buffer[512];
347                            int st;
348                          fread(buffer, size < 512 ? size : 512, 1, f);                          fread(buffer, size < 512 ? size : 512, 1, f);
349                          if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) <= 0) return;                          if((st = tw_write(ssl, sock, buffer, size < 512 ? size : 512)) <= 0) break;
350                  } else {                  } else {
351                          if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) return;                          if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) break;
352                  }                  }
353                  incr += 512;                  incr += 512;
354                  if(size <= 512) break;                  if(size <= 512) break;
# Line 1022  void tw_server_loop(void) { Line 1023  void tw_server_loop(void) {
1023          struct timeval tv;          struct timeval tv;
1024  #endif  #endif
1025  #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__NETWARE__) && !defined(__DOS__))  #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__NETWARE__) && !defined(__DOS__))
1026          struct thread_entry threads[2048];          struct thread_entry threads[128];
1027          for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) {          for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) {
1028                  threads[i].used = false;                  threads[i].used = false;
1029          }          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

nishi@chaotic.ninja
ViewVC Help
Powered by ViewVC 1.3.0-dev