blob: f7cd5283c8e78ae065ef4015c1e43680697f0d59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
// **********************************************************************
//
// Copyright (c) 2003
// ZeroC, Inc.
// Billerica, MA, USA
//
// All Rights Reserved.
//
// Ice is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 2 as published by
// the Free Software Foundation.
//
// **********************************************************************
#ifndef ICE_TCP_ENDPOINT_H
#define ICE_TCP_ENDPOINT_H
#include <Ice/Endpoint.h>
#include <Ice/EndpointFactory.h>
namespace IceInternal
{
const Ice::Short TcpEndpointType = 1;
class TcpEndpoint : public Endpoint
{
public:
TcpEndpoint(const InstancePtr&, const std::string&, Ice::Int, Ice::Int, bool);
TcpEndpoint(const InstancePtr&, const std::string&);
TcpEndpoint(BasicStream*);
virtual void streamWrite(BasicStream*) const;
virtual std::string toString() const;
virtual Ice::Short type() const;
virtual Ice::Int timeout() const;
virtual EndpointPtr timeout(Ice::Int) const;
virtual bool compress() const;
virtual EndpointPtr compress(bool) const;
virtual bool datagram() const;
virtual bool secure() const;
virtual bool unknown() const;
virtual TransceiverPtr clientTransceiver() const;
virtual TransceiverPtr serverTransceiver(EndpointPtr&) const;
virtual ConnectorPtr connector() const;
virtual AcceptorPtr acceptor(EndpointPtr&) const;
virtual bool equivalent(const TransceiverPtr&) const;
virtual bool equivalent(const AcceptorPtr&) const;
virtual bool operator==(const Endpoint&) const;
virtual bool operator!=(const Endpoint&) const;
virtual bool operator<(const Endpoint&) const;
private:
//
// All members are const, because endpoints are immutable.
//
const InstancePtr _instance;
const std::string _host;
const Ice::Int _port;
const Ice::Int _timeout;
const bool _compress;
};
class TcpEndpointFactory : public EndpointFactory
{
public:
virtual ~TcpEndpointFactory();
virtual Ice::Short type() const;
virtual std::string protocol() const;
virtual EndpointPtr create(const std::string&) const;
virtual EndpointPtr read(BasicStream*) const;
virtual void destroy();
private:
TcpEndpointFactory(const InstancePtr&);
friend class Instance;
InstancePtr _instance;
};
}
#endif
|