Name
ses_listen, ses_accept — create and accept on a server-side socket session
Synopsis
any ses_listen(
|
in port varchar); |
any ses_accept(
|
in listen_session any); |
Description
ses_listen creates a TCP listening socket bound to
port and returns a listen-session handle. The
port string may be a plain numeric port or a
host:port address. Requires DBA privileges.
ses_accept blocks waiting for an incoming connection
on a session previously returned by ses_listen and
returns a connected-session handle for the accepted client. Each call
accepts one client; loop over this BIF in a daemon procedure to serve many
clients.
The returned session handles are usable with the standard Virtuoso
string-session BIFs (read_object, get_plaintext_row,
file_to_string_output, ...). Together with
http_client these primitives enable simple TCP
servers written entirely in PL/SQL.