451 |
let set_socks_proxy t ss = |
let set_socks_proxy t ss = |
452 |
try |
try |
453 |
|
|
454 |
Buffer.clear buf; |
Buffer.reset buf; |
455 |
let s = read_buf in |
let s = read_buf in |
456 |
|
|
457 |
t.socks_proxy <- Some ss; |
t.socks_proxy <- Some ss; |
468 |
|
|
469 |
let send_and_wait () = |
let send_and_wait () = |
470 |
let s = Buffer.contents buf in |
let s = Buffer.contents buf in |
471 |
Buffer.clear buf; |
Buffer.reset buf; |
472 |
assert (local_sendto fd s 0 (String.length s) [] proxy_addr > 0); |
assert (local_sendto fd s 0 (String.length s) [] proxy_addr > 0); |
473 |
|
|
474 |
match Unix.select [fd] [] [] 30. with |
match Unix.select [fd] [] [] 30. with |