The GET_TEXT procedure returns the text data read from the input buffer.
Applicability
This topic applies only to OceanBase Database in Oracle mode.
Syntax
UTL_TCP.GET_TEXT (
c IN OUT NOCOPY connection,
len IN PLS_INTEGER DEFAULT 1,
peek IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
Parameters
| Parameter | Description |
|---|---|
| c | The TCP/IP connection. |
| len | The number of characters to receive. The default value is 1. |
| peek | If true, the data is viewed without being removed from the input queue (requires an input buffer). |
Return value
The content of the text line read.
Considerations
- The connection must be opened by using the
open_connectionprocedure. - Unless explicitly overridden, the buffer size is in bytes. The
lenparameter specifies the maximum number of characters to read. Ensure that the buffer size is at least large enough to accommodate one character. Typically, the buffer size should be set to the number of characters to read multiplied by the maximum number of bytes per character. - The message text is converted from the online character set at connection open time to the database character set and then returned.
- If a transfer timeout is set when the connection is opened, this function will wait for data packets until the timeout occurs, then stop reading and return all successfully read data. If no data is successfully read, the
transfer_timeoutexception is raised.