If -buf is specified, then the file is buffered. In this case, a pair of Tcl file ids are returned in a list. The first id is open for read access, the second for write. When writing to the file, the flush command must be used to force data in the buffer to be sent to the server. The close command must be called against both file ids when through with the socket. Buffered access will result in significantly better performance when reading data and will also improve a series of writes being done without intermixed reads. The fcntl command may be used to make one of these files unbuffered.
If -nobuf is specified, then the file is unbuffered and a single file id, open for both reading and writing, is returned.
If a host name is supplied and more than one address is valid for the host, the addresses are tried iteratively until a connection is established. Use server_info(1tcl) to obtain the list of valid addresses.