]> git.ipfire.org Git - thirdparty/squid.git/blame - src/comm/Connection.cc
Comm restructure part 2 - outbound connections
[thirdparty/squid.git] / src / comm / Connection.cc
CommitLineData
cfd66529
AJ
1#include "config.h"
2#include "cbdata.h"
3#include "comm.h"
4#include "comm/Connection.h"
5
6Comm::Connection::Connection() :
7 local(),
8 remote(),
9 _peer(NULL),
10 peer_type(HIER_NONE),
11 fd(-1),
12 tos(0),
13 flags(COMM_NONBLOCKING)
14{}
15
16Comm::Connection::Connection(Comm::Connection &c) :
17 local(c.local),
18 remote(c.remote),
19 _peer(c._peer),
20 peer_type(c.peer_type),
21 fd(c.fd),
22 tos(c.tos),
23 flags(c.flags)
24{}
25
26Comm::Connection::~Connection()
27{
28 if (fd >= 0) {
29 comm_close(fd);
30 }
31 if (_peer) {
32 cbdataReferenceDone(_peer);
33 }
34}