TCP IP Illustrated

4 which uses the carriage return and line feed to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is written to the network 1024 times. The -n and -w options can change these defaults. For example, sun % sock -i -nl2 -w4096 bsdi discard writes 12 buffers, each containing 4096 bytes of data, to the discard server on host bsdi. 4. Sink server: the -i and -s options are specified. Data is read from the network and discarded. Although these examples used TCP (the default), the -u option specifies UDP. There are a multitude of options that provide finer control over exactly how the program operates. These options are needed to generate all the test conditions used throughout the text. -b n Bind n as the client's local port number. (By default an ephemeral port number assigned by the system is used by the client.) -c Convert newline characters that are read on standard input into a carriage return and a linefeed. Similarly, when reading from the network, convert the sequence <carriage return, linefeed> into a single newline character. Many Internet applications expect NVT ASCII (Section 26.4), which uses the carriage return and line-feed to terminate each line. Specify the foreign IP address (a.b.c.d) and the foreign port number (p) -f a.b.c.d.p for a UDP end point (Section 11.12). file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/append_c.htm (2 of 4) [12/09/2001 14.48.01] Appendix C: The sock Program -h Implement TCP's half-close facility (Section 18.5). That is, do not terminate when an end-of-file is encountered on standard input. Instead, issue a half-close on the TCP connection but continue reading from the network until the peer closes the connection. -i Source client or sink server. Either write data to the network (default) or if used in conjunction with the -s option, read data from the network. The -n option can specify the number of buffers to write (or read), the -w option can specify the size of each write, and the -r option can specify the size of each read. -n n When used with the -i option, n specifies the number of buffers to read or write. The default value of n is 1024. -p n Specify the number of seconds to pau...
View Full Document

Ask a homework question - tutors are online