Interface OCI::Transport

interface Transport

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.

See Also:
Connector
Acceptor


Attribute Index

fragmentation
The Transport's maximum packet size.
handle
The "handle" for this Transport.
tag
The profile id tag.

Operation Index

close
Closes the Transport.
get_info
Returns the information object associated with the Transport.
receive
Receives a buffer's contents.
receive_detect
Similar to receive, but it signals a connection loss by returning FALSE instead of raising CORBA::COMM_FAILURE.
receive_timeout
Similar to receive, but it is possible to specify a timeout.
send
Sends a buffer's contents.
send_detect
Similar to send, but it signals a connection loss by returning FALSE instead of raising CORBA::COMM_FAILURE.
send_timeout
Similar to send, but it is possible to specify a timeout.
shutdown
Shuts down the Transport.

Attributes

fragmentation
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.


handle
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.


tag
readonly attribute ProfileId tag;

The profile id tag.



Operations

close
void close();

Closes the Transport. send and receive must not be called after close has been called.


get_info
TransportInfo get_info();

Returns the information object associated with the Transport.

Returns:
The Transport information object.

receive
void receive(in Buffer buf,
             in boolean block);

Receives a buffer's contents.

Parameters:
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.

receive_detect
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.

Parameters:
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.
Returns:
FALSE if a connection loss is detected, TRUE otherwise.

receive_timeout
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.

Parameters:
buf - The buffer to fill.
timeout - The timeout value in milliseconds. A zero timeout is equivalent to calling receive(buf, FALSE).

send
void send(in Buffer buf,
          in boolean block);

Sends a buffer's contents.

Parameters:
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.

send_detect
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.

Parameters:
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.
Returns:
FALSE if a connection loss is detected, TRUE otherwise.

send_timeout
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.

Parameters:
buf - The buffer to send.
timeout - The timeout value in milliseconds. A zero timeout is equivalent to calling send(buf, FALSE).

shutdown
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)