Write a line of data to the specified client session, terminated
with a carriage-return and linefeed.
Syntax
object.WriteLine( Handle, [Buffer] )
Parameters
- Handle
- An integer value that specifies the handle to the client
session.
- Buffer
- An optional string which contains the data that will be sent to
the remote host. The data will always be terminated with a
carriage-return and linefeed control character sequence. If this
argument is omitted, then a only a carriage-return and linefeed are
written to the socket. Note that if the string contains a null character,
any data that follows the null character will be discarded.
Return Value
This method returns True if the contents of the string have been
written to the socket. If an error occurs, the method will return
False.
Remarks
The WriteLine method writes a line of text to the remote
host and terminates the line with a carriage-return and linefeed
control character sequence. Unlike the Write method which
writes arbitrary bytes of data to the socket, this method is
specifically designed to write a single line of text data from a
string.
The WriteLine method should only be used to send text,
never binary data. In particular, the method will discard any data
that follows a null character and will append linefeed and carriage return
control characters to the data stream. Calling this this method will
force the thread to block until the complete line of text has been
written, the write operation times out or the remote host aborts the
connection.
The Write and WriteLine function calls can be safely
intermixed.
See Also
CodePage Property,
IsWritable Property,
Timeout Property,
Read Method,
ReadLine Method,
Write Method
|