blob: 6dd717561a75fec789265ba8c403e09d04e073bd (
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
// -*- C++ -*-
// $Id$
// ****************************************************************
ACE_INLINE ssize_t
TAO_Transport::read (char *buf,
size_t len,
const ACE_Time_Value * /*max_wait_time*/)
{
int val = 0;
// Set it to blocking mode
ACE::record_and_set_non_blocking_mode (this->handle (),
val);
ssize_t ret = ACE::recv (this->handle (),
(void *) buf,
len);
ACE::restore_non_blocking_mode (this->handle (),
val);
return ret;
}
// @@ One of the orb_core () methods should be done away. Will visit
// @@ this later -- Bala
ACE_INLINE TAO_ORB_Core *
TAO_Transport::orb_core (void) const
{
return this->orb_core_;
}
ACE_INLINE TAO_ORB_Core *
TAO_Transport::orb_core (void)
{
return this->orb_core_;
}
ACE_INLINE TAO_Transport_Mux_Strategy *
TAO_Transport::tms (void) const
{
return tms_;
}
// Return the Wait strategy used by the Transport.
ACE_INLINE TAO_Wait_Strategy *
TAO_Transport::wait_strategy (void) const
{
return this->ws_;
}
ACE_INLINE CORBA::ULong
TAO_Transport::tag (void) const
{
return this->tag_;
}
ACE_INLINE long
TAO_Transport::buffering_timer_id (void) const
{
return this->buffering_timer_id_;
}
ACE_INLINE void
TAO_Transport::buffering_timer_id (long new_value)
{
this->buffering_timer_id_ = new_value;
}
ACE_INLINE const ACE_Time_Value &
TAO_Transport::buffering_timeout_value (void) const
{
return this->buffering_timeout_value_;
}
ACE_INLINE void
TAO_Transport::buffering_timeout_value (const ACE_Time_Value &new_value)
{
this->buffering_timeout_value_ = new_value;
}
ACE_INLINE TAO_Transport_Buffering_Queue &
TAO_Transport::buffering_queue (void)
{
if (this->buffering_queue_ == 0)
{
// Infinite high water mark: ACE_UINT32_MAX.
this->buffering_queue_ =
new TAO_Transport_Buffering_Queue (ACE_UINT32_MAX);
}
return *this->buffering_queue_;
}
ACE_INLINE void
TAO_Transport::dequeue_head (void)
{
// Remove from the head of the queue.
ACE_Message_Block *message_block = 0;
int result = this->buffering_queue_->dequeue_head (message_block);
// @@ What to do here on failures?
ACE_ASSERT (result != -1);
ACE_UNUSED_ARG (result);
// Release the memory.
message_block->release ();
}
ACE_INLINE void
TAO_Transport::dequeue_all (void)
{
// Flush all queued messages.
if (this->buffering_queue_)
{
while (!this->buffering_queue_->is_empty ())
this->dequeue_head ();
}
}
// ****************************************************************
ACE_INLINE TAO_ORB_Core *
TAO_Connector::orb_core (void)
{
return this->orb_core_;
}
ACE_INLINE void
TAO_Connector::orb_core (TAO_ORB_Core *orb_core)
{
this->orb_core_ = orb_core;
}
ACE_INLINE CORBA::ULong
TAO_Connector::tag (void) const
{
return this->tag_;
}
// ****************************************************************
ACE_INLINE CORBA::ULong
TAO_Acceptor::tag (void) const
{
return this->tag_;
}
ACE_INLINE CORBA::Short
TAO_Acceptor::priority (void) const
{
return this->priority_;
}
|