ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vpn_tcp.C
(Generate patch)

Comparing gvpe/src/vpn_tcp.C (file contents):
Revision 1.12 by pcg, Thu Mar 3 16:54:34 2005 UTC vs.
Revision 1.13 by pcg, Wed Mar 23 20:07:56 2005 UTC

61 61
62struct tcp_si_map : public map<const sockinfo *, tcp_connection *, lt_sockinfo> { 62struct tcp_si_map : public map<const sockinfo *, tcp_connection *, lt_sockinfo> {
63 void cleaner_cb (time_watcher &w); time_watcher cleaner; 63 void cleaner_cb (time_watcher &w); time_watcher cleaner;
64 64
65 tcp_si_map () 65 tcp_si_map ()
66 : cleaner(this, &tcp_si_map::cleaner_cb) 66 : cleaner(this, &tcp_si_map::cleaner_cb)
67 {
68 cleaner.start (0);
69 } 67 { }
68
70} tcp_si; 69} tcp_si;
71 70
72struct tcp_connection : io_watcher { 71struct tcp_connection : io_watcher {
73 tstamp last_activity; 72 tstamp last_activity;
74 const sockinfo si; 73 const sockinfo si;
93 bool write_packet (); 92 bool write_packet ();
94 93
95 void error (); // abort conenction && cleanup 94 void error (); // abort conenction && cleanup
96 95
97 operator tcp_si_map::value_type() 96 operator tcp_si_map::value_type()
98 { 97 {
99 return tcp_si_map::value_type (&si, this); 98 return tcp_si_map::value_type (&si, this);
100 } 99 }
101 100
102 tcp_connection (int fd_, const sockinfo &si_, vpn &v_); 101 tcp_connection (int fd_, const sockinfo &si_, vpn &v_);
103 ~tcp_connection (); 102 ~tcp_connection ();
104}; 103};
105 104
448} 447}
449 448
450tcp_connection::tcp_connection (int fd_, const sockinfo &si_, vpn &v_) 449tcp_connection::tcp_connection (int fd_, const sockinfo &si_, vpn &v_)
451: v(v_), si(si_), io_watcher(this, &tcp_connection::tcpv4_ev) 450: v(v_), si(si_), io_watcher(this, &tcp_connection::tcpv4_ev)
452{ 451{
452 if (!tcp_si.cleaner.active)
453 tcp_si.cleaner.start (0);
454
453 last_activity = NOW; 455 last_activity = NOW;
454 r_pkt = 0; 456 r_pkt = 0;
455 w_pkt = 0; 457 w_pkt = 0;
456 fd = fd_; 458 fd = fd_;
457#if ENABLE_HTTP_PROXY 459#if ENABLE_HTTP_PROXY

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines