/[mldonkey]/mldonkey/src/utils/net/tcpBufferedSocket.ml
ViewVC logotype

Diff of /mldonkey/src/utils/net/tcpBufferedSocket.ml

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

revision 1.26 by spiralvoice, Thu Jul 7 17:22:43 2005 UTC revision 1.27 by spiralvoice, Thu Jul 14 14:02:28 2005 UTC
# Line 30  let max_connections_per_second = ref (fu Line 30  let max_connections_per_second = ref (fu
30  let opened_connections = ref 0  let opened_connections = ref 0
31  let opened_connections_this_second = ref 0  let opened_connections_this_second = ref 0
32    
33  let max_buffer_size = ref 100000  let max_buffer_size = ref 1000000
34    
35  let bind_address = ref Unix.inet_addr_any  let bind_address = ref Unix.inet_addr_any
36  let ip_packet_size = ref 40  let ip_packet_size = ref 40
# Line 410  let buf_add t b s pos1 len = Line 410  let buf_add t b s pos1 len =
410        end        end
411      else      else
412      if b.len + len > b.max_buf_size then begin      if b.len + len > b.max_buf_size then begin
413          lprintf "BUFFER OVERFLOW %d+%d> %d    " b.len len b.max_buf_size ;          lprintf "[TCP_BS]: BUFFER OVERFLOW %d+%d> %d " b.len len b.max_buf_size ;
414    
415          lprintf "MESSAGE [";          lprintf "MESSAGE: [";
416          for i = pos1 to pos1 + (mini len 20) - 1 do          for i = pos1 to pos1 + (mini len 20) - 1 do
417            lprintf "(%d)" (int_of_char s.[i]);            lprintf "(%d)" (int_of_char s.[i]);
418          done;          done;
# Line 1520  let set_max_output_buffer  t len = Line 1520  let set_max_output_buffer  t len =
1520  let to_deflate = ref []  let to_deflate = ref []
1521  let to_deflate_len = ref 0  let to_deflate_len = ref 0
1522    
1523  let compression_buffer_len = 20000  let compression_buffer_len = !max_buffer_size / 10
1524  let compression_buffer = String.create compression_buffer_len  let compression_buffer = String.create compression_buffer_len
1525    
1526  let deflate_connection sock =  let deflate_connection sock =

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26