Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5631 in orxonox.OLD


Ignore:
Timestamp:
Nov 18, 2005, 2:33:26 PM (18 years ago)
Author:
rennerc
Message:

network_socket: commented out some non-working code

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_socket.cc

    r5630 r5631  
    172172
    173173  //printf("length=%d, bufsize=%d\n", length, _OUTGOING_BUFFER_SIZE);
    174   if (length>_OUTGOING_BUFFER_SIZE)
    175   {
    176     int res = 0;
    177     int n = length / _OUTGOING_BUFFER_SIZE;
    178     if (length % _OUTGOING_BUFFER_SIZE != 0)
    179       n++;
    180 //     printf("n=%d\n", n);
    181     SDL_Delay(500);
    182     for (int i = 0; i<n; i++)
    183     {
    184 //       printf("i=%d\n", i);
    185       if (i==n-1)
    186       {
    187         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, length-i*_OUTGOING_BUFFER_SIZE);
    188 //         printf("res = %d\n", res);
    189       }
    190       else
    191       {
    192         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, _OUTGOING_BUFFER_SIZE);
    193 //         printf("res = %d\n", res);
    194       }
    195     }
    196     return res;
    197   }
     174//   if (length>_OUTGOING_BUFFER_SIZE)
     175//   {
     176//     int res = 0;
     177//     int n = length / _OUTGOING_BUFFER_SIZE;
     178//     if (length % _OUTGOING_BUFFER_SIZE != 0)
     179//       n++;
     180// //     printf("n=%d\n", n);
     181//     SDL_Delay(500);
     182//     for (int i = 0; i<n; i++)
     183//     {
     184// //       printf("i=%d\n", i);
     185//       if (i==n-1)
     186//       {
     187//         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, length-i*_OUTGOING_BUFFER_SIZE);
     188// //         printf("res = %d\n", res);
     189//       }
     190//       else
     191//       {
     192//         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, _OUTGOING_BUFFER_SIZE);
     193// //         printf("res = %d\n", res);
     194//       }
     195//     }
     196//     return res;
     197//   }
    198198
    199199#define min(a,b) (a<b)?a:b
  • branches/network/src/lib/network/network_socket.h

    r5630 r5631  
    1212
    1313#define _INCOMING_BUFFER_SIZE 10240
    14 #define _OUTGOING_BUFFER_SIZE 302400
     14#define _OUTGOING_BUFFER_SIZE 2024000
    1515#define _LOCAL_BUFFER_SIZE 1024
    1616//sleep if incoming buffer is full
Note: See TracChangeset for help on using the changeset viewer.