HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 194

nonblocking I/O

Page 194 highlights

Index BSD IPC connections, 29, 124 BSD IPC system calls, 173 BSD IPC using datagram sockets, 86 channel, 18 client, 21 client-server model, 21 closing a socket, 47, 100, 139, 159 communication domain, 18 Creating a Socket, 128 creating a socket, 35, 40, 133 creating sockets, 92 datagram sockets, 18, 86 declaring socket address variables, 31, 88, 126 example using stream sockets, 48 examples using datagram sockets, 101 FIONREAD, 178 FIOSBNIO, 77 Flag Options, 45 flag options, 98, 138 getting and setting socket options, 62 getting the port address for the desired server, 90 getting the remote hostsInternetaddress", 32 getting the remote hostsnetworkaddress", 89 graceful close, 49 I/O multiplexing with select, 114 INADDR_ANY, 91 incoming connection requests, 173 Internet address, 18, 31, 86 ioctl, 178 library calls, 175, 177, 179 library equivalencies, 179 library routines, 25 LINGER options, 47 listensbacklogparameter", 178 message, 18 MSG_OOB, 45, 82 MSG_PEEK, 45, 99, 112 nonblocking I/O, 41, 121 nondestructive read, 45 other system calls, 174 out of band data, 45 out-of-band data, 81 packet, 18 pathname, 126 peer, 18 pending connections, 178 port, 18 port address, 31, 88 portability issues, 177 preparing address variables, 31, 88, 126 preview an incoming message, 99 preview incoming data, 46 programming hints, 167 protocols, 18 pty location, 178 Receiving Data, 44 receiving data, 137 receiving messages, 96, 156 requesting a connection, 41, 134 sending and receiving data, 43, 136 sending and receiving messages, 95, 155 sending and receiving out-of- band data, 81 sending data, 43, 136 sending messages, 95 server, 21 setting the server up to wait for connection, 37, 130 signal calls, 179 SIOCATMARK, 83 SO_DONTROUTE, 67 SO_KEEPALIVE, 66 SO_LINGER, 68, 78 SO_RCVBUF, 67 SO_REUSEADDR, 65 SO_SNDBUF, 67 sockaddr, 31, 88, 126 sockaddr_in, 31, 88, 126 socket address, 19, 31, 126 socket descriptor, 19, 35, 128 specifying a default socket address, 112 sprintf return value, 179 stream sockets, 18 summary tables for system and library calls, 173 TCP, 19 troubleshooting, 167 UDP, 19 using a wildcard local address, 34, 91 using broadcast addresses, 122 using diagnostic utilities as troubleshooting, 168 using read/write to make stream transparent, 80 sockets using shutdown, 78 wildcard addressing, 31, 34, 91 writing the client process, 40, 133 writing the server and client processes, 92 writing the server process, 35, 128 Interprocess communication addressing domain, 150 BSD IPC connections, 17 creating a socket, 152 declaring socket address variables, 150 pathname, 150 194

  • 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
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196

194
Index
BSD IPC connections
,
29
,
124
BSD IPC system calls
,
173
BSD
IPC
using
datagram
sockets
,
86
channel
,
18
client
,
21
client-server model
,
21
closing a socket
,
47
,
100
,
139
,
159
communication domain
,
18
Creating a Socket
,
128
creating a socket
,
35
,
40
,
133
creating sockets
,
92
datagram sockets
,
18
,
86
declaring
socket
address
variables
,
31
,
88
,
126
example using stream sockets
,
48
examples
using
datagram
sockets
,
101
FIONREAD
,
178
FIOSBNIO
,
77
Flag Options
,
45
flag options
,
98
,
138
getting
and
setting
socket
options
,
62
getting the port address for the
desired server
,
90
getting
the
remote
hostsInternetaddress"
,
32
getting
the
remote
hostsnetworkaddress"
,
89
graceful close
,
49
I/O multiplexing with select
,
114
INADDR_ANY
,
91
incoming connection requests
,
173
Internet address
,
18
,
31
,
86
ioctl
,
178
library calls
,
175
,
177
,
179
library equivalencies
,
179
library routines
,
25
LINGER options
,
47
listensbacklogparameter"
,
178
message
,
18
MSG_OOB
,
45
,
82
MSG_PEEK
,
45
,
99
,
112
nonblocking I/O
,
41
,
121
nondestructive read
,
45
other system calls
,
174
out of band data
,
45
out-of-band data
,
81
packet
,
18
pathname
,
126
peer
,
18
pending connections
,
178
port
,
18
port address
,
31
,
88
portability issues
,
177
preparing address variables
,
31
,
88
,
126
preview an incoming message
,
99
preview incoming data
,
46
programming hints
,
167
protocols
,
18
pty location
,
178
Receiving Data
,
44
receiving data
,
137
receiving messages
,
96
,
156
requesting a connection
,
41
,
134
sending and receiving data
,
43
,
136
sending
and
receiving
messages
,
95
,
155
sending and receiving out-of-
band data
,
81
sending data
,
43
,
136
sending messages
,
95
server
,
21
setting the server up to wait for
connection
,
37
,
130
signal calls
,
179
SIOCATMARK
,
83
SO_DONTROUTE
,
67
SO_KEEPALIVE
,
66
SO_LINGER
,
68
,
78
SO_RCVBUF
,
67
SO_REUSEADDR
,
65
SO_SNDBUF
,
67
sockaddr
,
31
,
88
,
126
sockaddr_in
,
31
,
88
,
126
socket address
,
19
,
31
,
126
socket descriptor
,
19
,
35
,
128
specifying
a
default
socket
address
,
112
sprintf return value
,
179
stream sockets
,
18
summary tables for system and
library calls
,
173
TCP
,
19
troubleshooting
,
167
UDP
,
19
using a wildcard local address
,
34
,
91
using broadcast addresses
,
122
using diagnostic utilities as
troubleshooting
,
168
using
read/write
to
make
stream
sockets
transparent
,
80
using shutdown
,
78
wildcard addressing
,
31
,
34
,
91
writing the client process
,
40
,
133
writing the server and client
processes
,
92
writing the server process
,
35
,
128
Interprocess communication
addressing domain
,
150
BSD IPC connections
,
17
creating a socket
,
152
declaring
socket
address
variables
,
150
pathname
,
150