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
|
/* -*- C++ -*- */
// $Id$
// SOCK_Stream.i
#include "ace/SOCK_Stream.h"
// Shut down just the reading end of a ACE_SOCK.
inline int
ACE_SOCK_Stream::close_reader (void)
{
ACE_TRACE ("ACE_SOCK_Stream::close_reader");
return ACE_OS::shutdown (this->get_handle (), 0);
}
// Shut down just the writing end of a ACE_SOCK.
inline int
ACE_SOCK_Stream::close_writer (void)
{
ACE_TRACE ("ACE_SOCK_Stream::close_writer");
return ACE_OS::shutdown (this->get_handle (), 1);
}
inline ssize_t
ACE_SOCK_Stream::send_n (const void *buf, size_t len, int flags,
const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_SOCK_Stream::send_n");
return ACE::send_n (this->get_handle (), buf, len, flags, timeout);
}
inline ssize_t
ACE_SOCK_Stream::recv_n (void *buf, size_t len, int flags,
const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_SOCK_Stream::recv_n");
return ACE::recv_n (this->get_handle (), buf, len, flags, timeout);
}
// Receive exactly BUF_SIZE bytes from file descriptor this->handle
// into <buf>. Keep trying until this many bytes are received.
inline ssize_t
ACE_SOCK_Stream::recv_n (void *buf, int buf_size, int flags) const
{
ACE_TRACE ("ACE_SOCK_Stream::recv_n");
return ACE::recv_n (this->get_handle (), buf, buf_size, flags);
}
// Send exactly N bytes from <buf> to <handle>. Keeping trying
// until this many bytes are sent.
inline ssize_t
ACE_SOCK_Stream::send_n (const void *buf, int buf_size, int flags) const
{
ACE_TRACE ("ACE_SOCK_Stream::send_n");
return ACE::send_n (this->get_handle (), buf, buf_size, flags);
}
// Receive exactly BUF_SIZE bytes from file descriptor
// into BUF. Keep trying until this many bytes are received.
inline ssize_t
ACE_SOCK_Stream::recv_n (void *buf, int buf_size) const
{
ACE_TRACE ("ACE_SOCK_Stream::recv_n");
return ACE::recv_n (this->get_handle (), buf, buf_size);
}
// Send exactly N bytes from BUF to THIS->SOK_FD. Keeping trying
// until this many bytes are sent.
inline ssize_t
ACE_SOCK_Stream::send_n (const void *buf, int buf_size) const
{
ACE_TRACE ("ACE_SOCK_Stream::send_n");
return ACE::send_n (this->get_handle (), buf, buf_size);
}
inline ssize_t
ACE_SOCK_Stream::send_urg (void *ptr, int len)
{
ACE_TRACE ("ACE_SOCK_Stream::send_urg");
return ACE_OS::send (this->get_handle (), (char *) ptr, len, MSG_OOB);
}
inline ssize_t
ACE_SOCK_Stream::recv_urg (void *ptr, int len)
{
ACE_TRACE ("ACE_SOCK_Stream::recv_urg");
return ACE_OS::recv (this->get_handle (), (char *) ptr, len, MSG_OOB);
}
|