MBX_$TIMED_OPEN Domain/OS MBX_$TIMED_OPEN
NAME
mbx_$timed_open - open a client channel with a timeout
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/mbx.h>
void mbx_$timed_open(
char *path_name,
short &path_length,
void *&buffer_pointer,
long &buffer_length,
time_$clockh_t &wait_time,
void **mbx_handle,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/mbx.ins.pas';
procedure mbx_$timed_open(
in path_name: univ mbx_$name_t;
in path_length: integer;
in buffer_pointer: univ_ptr;
in buffer_length: integer32;
in wait_time: time_$clockh_t;
out mbx_handle: univ_ptr;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/mbx.ins.ftn'
integer*2 path_length, wait_time(3)
integer*4 buffer_length, mbx_handle, status
character path_name*1023
integer*4 buffer_pointer
character buffer*32760
pointer /buffer_pointer/ buffer
call mbx_$timed_open(path_name, path_length,
& buffer_pointer, buffer_length,
& wait_time, mbx_handle, status)
DESCRIPTION
Mbx_$timed_open registers the caller as a client of the mailbox at
path_name and sends a mbx_$channel_open_mt message to the mailbox's
server to request a channel. If the server doesn't respond by accepting
or rejecting the request before the number of quarter-seconds specified
in wait_time is reached, mbx_$timed_open returns with a status of
mbx_$open_timed_out. Otherwise, mbx_$open returns with a status code
indicating whether the caller's channel request was accepted by the
server.
If there is no server for the mailbox, mbx_$timed_open returns immedi-
ately.
path_name
The pathname of a mailbox.
path_length
The number of bytes in path_name.
buffer_pointer
A pointer to a buffer containing data to be sent with the open
request. Mbx_$timed_open ignores buffer_pointer if buffer_length is
0.
buffer_length
The number of bytes to send from the buffer at buffer_pointer.
Buffer_length must be less than mbx_$msg_max even if the buffers in
the target mailbox are larger. If buffer_length is 0,
mbx_$timed_open ignores buffer_pointer.
wait_time
The number of quarter-seconds to wait for an open channel. If
wait_time is 0, mbx_$timed_open is effectively equivalent to
mbx_$open, and will wait forever for a response from the server.
mbx_handle
A handle on the mailbox if the open request was accepted by the
server.
status
The completion status. If status is not mbx_$open_timed_out or
status_$ok, then the open request failed or was refused by the
server.