The interface for a Transport object, which provides operations for sending and receiving octet streams. In addition, it is possible to register callbacks with the Transport object, which are invoked whenever data can be sent or received without blocking.
receive
, but it signals a connection
loss by returning FALSE
instead of raising
CORBA::COMM_FAILURE
.
receive
, but it is
possible to specify a timeout.
send
, but it signals a connection loss
by returning FALSE
instead of raising
CORBA::COMM_FAILURE
.
send
, but it is possible
to specify a timeout.
readonly attribute unsigned long fragmentation;
The Transport's maximum packet size. The send
and
receive
operations must not be used to send packets
larger than this size within a single call. A value of 0 means
that there is no upper limit for the packet size.
readonly attribute Handle handle;
The "handle" for this Transport. The handle may only
be used to determine whether the Transport object is ready to
send or to receive data, e.g., with select()
on
Unix-based operating systems. All other uses (e.g., calls to
read()
, write()
,
close()
) are strictly non-compliant. A handle
value of -1 indicates that the protocol plug-in does not
support "selectable" Transports.
readonly attribute ProfileId tag;
The profile id tag.
void close();
Closes the Transport. send
and
receive
must not be called after
close
has been called.
TransportInfo get_info();
Returns the information object associated with the Transport.
void receive(in Buffer buf, in boolean block);
Receives a buffer's contents.
buf
- The buffer to fill.
block
- If set to TRUE
, the operation blocks
until the buffer is full. If set to FALSE
, the
operation fills as much of the buffer as possible without
blocking.
boolean receive_detect(in Buffer buf, in boolean block);
Similar to receive
, but it signals a connection
loss by returning FALSE
instead of raising
CORBA::COMM_FAILURE
.
buf
- The buffer to fill.
block
- If set to TRUE
, the operation blocks
until the buffer is full. If set to FALSE
, the
operation fills as much of the buffer as possible without
blocking.
FALSE
if a connection loss is
detected, TRUE
otherwise.
void receive_timeout(in Buffer buf, in unsigned long timeout);
Similar to receive
, but it is
possible to specify a timeout. On return the caller can test
whether there was a timeout by checking if the buffer has
been filled completely.
buf
- The buffer to fill.
timeout
- The timeout value in milliseconds. A zero
timeout is equivalent to calling receive(buf, FALSE)
.
void send(in Buffer buf, in boolean block);
Sends a buffer's contents.
buf
- The buffer to send.
block
- If set to TRUE
, the operation blocks
until the buffer has completely been sent. If set to
FALSE
, the operation sends as much of the buffer's
data as possible without blocking.
boolean send_detect(in Buffer buf, in boolean block);
Similar to send
, but it signals a connection loss
by returning FALSE
instead of raising
CORBA::COMM_FAILURE
.
buf
- The buffer to fill.
block
- If set to TRUE
, the operation blocks
until the entire buffer has been sent. If set to
FALSE
, the operation sends as much of the buffer's
data as possible without blocking.
FALSE
if a connection loss is
detected, TRUE
otherwise.
void send_timeout(in Buffer buf, in unsigned long timeout);
Similar to send
, but it is possible
to specify a timeout. On return the caller can test whether
there was a timeout by checking if the buffer has
been sent completely.
buf
- The buffer to send.
timeout
- The timeout value in milliseconds. A zero
timeout is equivalent to calling send(buf, FALSE)
.
void shutdown();
Shuts down the Transport. After calling shutdown
,
all calls to the send
and receive
operations result in an appropriate
CORBA::COMM_FAILURE
exception being raised.
Generated by the ORBacus IDL-to-HTML translator (non-commercial)