Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

UTL_TCP , 12 of 15


get_raw(), get_text(), get_line() Functions

Convenient forms of the read functions, which return the data read instead of the amount of data read.

Syntax

UTL_TCP.GET_RAW (c     IN OUT NOCOPY connection,
                 len   IN            PLS_INTEGER DEFAULT 1,
                 peek  IN            BOOLEAN     DEFAULT FALSE) RETURN RAW;
UTL_TCP.GET_TEXT (c    IN OUT NOCOPY connection,
                  len  IN            PLS_INTEGER DEFAULT 1,
                  peek IN            BOOLEAN     DEFAULT FALSE) RETURN VARCHAR2;
UTL_TCP.GET_LINE (c           IN OUT NOCOPY connection,
                  remove_crlf IN            BOOLEAN DEFAULT false,
                  peek        IN            BOOLEAN DEFAULT FALSE) RETURN 
VARCHAR2;
Table 83-12 get_raw(), get_text(), and get_line() Function Parameters
Parameter  Description 

c (IN OUT NOCOPY) 

The TCP connection to receive data from. 

len (IN) 

The number of bytes (or characters for VARCHAR2) of data to receive. Default is 1. 

peek (IN) 

Normally, users want to read the data and remove it from the input queue, i.e. consuming it. In some situations, users may just want to look ahead at the data, i.e. peeking it, without removing it from the input queue so that it is still available for reading (or even peeking) in the next call. To keep the data in the input queue, set this flag to TRUE and an input buffer must be set up when the connection is opened. The amount of data that can be peeked (i.e. read but kept in the input queue) must be less the size of input buffer. 

remove_crlf (IN) 

If TRUE, the trailing CR/LF character(s) are removed from the received message. 

Usage Notes

The connection must have already been opened via a call to open_connection().

For all the get_* APIs described in this section, see the corresponding read_* API for the read time-out issue. For get_text and get_line, see the corresponding
read_* API for character set conversion, buffer size, and multi-byte character issues.

Related Functions

read_raw(), read_text(), read_line()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback