| < Day Day Up > |
|
SCTP (Stream Control Transmission Protocol), 11–12
Segments
ensuring full-sized segments, 130–131
Maximum Segment Size (MSS), 90, 92–93,130–131
select function
advantages and disadvantages of, 136–137
described, 60–65
Perl TCP server, 232–233
Python TCP server, 209–210
Ruby TCP server, 254–256
Tcl implementation, 271–272
Sending data
optimizing buffer sizes, 131–133
optimizing, 135–136
send function, 38, 52–55
sendto function, 38, 52–55
socket buffer size, 68, 81, 86–87
Sequenced stream sockets, 39–40
Servers
accept function, 38, 45–47
binding addresses, 42–43
broadcast datagram server/client
C language, 302–304
design, 280–281
Perl, 374–375
Python, 352–353
Ruby, 396–397
client/server symmetry, 32–33
connect function, 38, 47–49
datagram server/client
C language, 294–296
design, 279–280
Java, 320–323
Perl, 347–348
Python, 347–348
Ruby, 391–392
getservbyname function, 60, 75–77
getservbyport function, 60, 77–78
listen function, 38, 44–45
multicast server/client
C language, 298–300
design, 281–282
Java, 325–327
Perl, 372–373
Python, 349–350
Ruby, 393–394
Tcl, 415–417
Sockets programming example (server.c), 27–30
static ports, 6
stream server in Java, 316–318
stream server/client
C language, 290–293
design, 278–279
Perl, 366–368
Python, 344–346
Ruby, 388–390
Tcl, 410–412
writing for multihomed nodes, 109–113
ServerSocket class (Java), 180
Service
Perl methods for information, 232
Python methods for information, 209
Ruby methods for information, 254
Tcl methods for information, 271
sethostname function, 60, 69–70
setsockopt function, 60, 67–68, 80–81. see also Socket options
shutdown function, 60, 68–69
SIGURG signal, 105
SMTP (Simple Mail Transport Protocol)
client
C language, 310–314
design, 285–287
Java, 336–341
Perl, 382–386
Python, 360–364
Ruby, 403–408
Tcl, 424–427
Net::SMTP Perl module, 234–235
Net::SMTP Ruby class, 256–257
Python smtplib module, 211
resources, 288
sockatmark function, 105
Socket addresses
C language, 163–194
Java, 182–183
Perl, 220–221
Python, 200
Ruby, 245–246
Tcl, 266
Socket class, 179–180, 241
Socket options
C language, 169–170
getsockopt function, 60, 67–68, 80–81
IPPROTO_IP options, 67–68, 80, 93–101
IPPROTO_TCP options, 67–68, 80, 90–93
Java, 189–190
Perl, 229–231
Python, 205–208
Ruby, 252–253
setsockopt function, 60, 67–68, 80–81
SO_BROADCAST option, 81–82
SO_DEBUG option, 81, 82–83
SO_DONTROUTE option, 81, 83
SO_ERROR option, 81, 83–84
SO_KEEPALIVE option, 81, 85–86
SO_LINGER option, 81, 84–85
SO_RCVBUF option, 81, 86–87, 131–133
SO_RCVLOWAT option, 81, 87
SO_RCVTIMEO option, 81, 88
SO_REUSEADDR option, 81, 89–90
SO_SNDBUF option, 81, 86–87, 131–133
SO_SNDLOWAT option, 81, 87–88
SO_SNDTIMEO option, 81, 88
SO_TYPE option, 81
SOL_SOCKET options, 67–68, 80–90
Tcl, 269–270
Sockets
blocking and nonblocking, 106, 146
creating and destroying
C language, 162
Java, 181–182
Perl, 218–220
Python, 199–200
Ruby, 243–245
Tcl, 263–266
described, 26
functions, list of, 38, 60. see also specific functions
multiple, 137
separating control and data connections, 138
socket function, 38, 39–40
Sockets I/O
C language, 166–169
Java, 186–189
Perl, 225–229
Python, 203–205
Ruby, 249–252
Tcl, 267–269
Sockets programming, 26–30. see also Code patterns
SocketServer module (Python), 212–213
Software license, 430–431
Stacks
callbacks, 138–139
configuration, 141
TCP/IP stack selection, 140–141
zero-copy buffer functions, 139
Static ports, 6
Stream Control Transmission Protocol (SCTP), 11–12
Stream sockets
described, 39–40
Java, 186–188
Perl, 225–228
Python, 203–204
Ruby, 250–251
Tcl, 267–269
Streaming
stream client design, 278–279
stream mode, 13
stream server design, 278–279
stream server/client
C language, 290–294
Java, 316–320
Perl, 366–369
Python, 344–347
Ruby, 388–391
Tcl, 410–413
String arrays, 153
Subnetting, 17
Swapping byte order, 34
System requirements, 429
| < Day Day Up > |
|