---
name: "GLOBUS_XIO_API"
section: "3"
platform: "linux"
package: "libglobus-xio-doc"
version: "6.6-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GLOBUS_XIO_API"
---

# GLOBUS\_XIO\_API(3)

Globus XIO API - Globus XIO API.

## NAME

GLOBUS\_XIO\_API - Globus XIO API

 \- Globus XIO API.

## SYNOPSIS

### Typedefs

typedef void(\* **globus\_xio\_accept\_callback\_t**) (globus\_xio\_server\_t server, globus\_xio\_handle\_t handle, globus\_result\_t result, void \*user\_arg)\
 typedef void(\* **globus\_xio\_server\_callback\_t**) (globus\_xio\_server\_t server, void \*user\_arg)\
 typedef globus\_bool\_t(\* **globus\_xio\_timeout\_callback\_t**) (globus\_xio\_handle\_t handle, **globus\_xio\_operation\_type\_t** type, void \*user\_arg)\
 typedef void(\* **globus\_xio\_callback\_t**) (globus\_xio\_handle\_t handle, globus\_result\_t result, void \*user\_arg)\
 typedef void(\* **globus\_xio\_data\_callback\_t**) (globus\_xio\_handle\_t handle, globus\_result\_t result, globus\_byte\_t \*buffer, globus\_size\_t len, globus\_size\_t nbytes, globus\_xio\_data\_descriptor\_t data\_desc, void \*user\_arg)\
 typedef void(\* **globus\_xio\_iovec\_callback\_t**) (globus\_xio\_handle\_t handle, globus\_result\_t result, globus\_xio\_iovec\_t \*iovec, int count, globus\_size\_t nbytes, globus\_xio\_data\_descriptor\_t data\_desc, void \*user\_arg)\
 typedef enum **globus\_i\_xio\_op\_type\_e** **globus\_xio\_operation\_type\_t**\

### Enumerations

enum **globus\_i\_xio\_op\_type\_e** \
 enum **globus\_xio\_handle\_cmd\_t** { **GLOBUS\_XIO\_GET\_LOCAL\_CONTACT** = 12345, **GLOBUS\_XIO\_GET\_LOCAL\_NUMERIC\_CONTACT**, **GLOBUS\_XIO\_GET\_REMOTE\_CONTACT**, **GLOBUS\_XIO\_GET\_REMOTE\_NUMERIC\_CONTACT**, **GLOBUS\_XIO\_SEEK**, **GLOBUS\_XIO\_SET\_STRING\_OPTIONS**, **GLOBUS\_XIO\_GET\_STRING\_OPTIONS**, **GLOBUS\_XIO\_GET\_DRIVER\_NAME** }\

### Functions

globus\_result\_t **globus\_xio\_attr\_init** (globus\_xio\_attr\_t \*attr)\
 globus\_result\_t **globus\_xio\_attr\_cntl** (globus\_xio\_attr\_t attr, globus\_xio\_driver\_t driver, int cmd,...)\
 globus\_result\_t **globus\_xio\_attr\_copy** (globus\_xio\_attr\_t \*dst, globus\_xio\_attr\_t src)\
 globus\_result\_t **globus\_xio\_attr\_destroy** (globus\_xio\_attr\_t attr)\
 globus\_result\_t **globus\_xio\_stack\_init** (globus\_xio\_stack\_t \*stack, globus\_xio\_attr\_t stack\_attr)\
 globus\_result\_t **globus\_xio\_stack\_push\_driver** (globus\_xio\_stack\_t stack, globus\_xio\_driver\_t driver)\
 globus\_result\_t **globus\_xio\_stack\_copy** (globus\_xio\_stack\_t \*dst, globus\_xio\_stack\_t src)\
 globus\_result\_t **globus\_xio\_stack\_destroy** (globus\_xio\_stack\_t stack)\
 globus\_result\_t **globus\_xio\_server\_create** (globus\_xio\_server\_t \*server, globus\_xio\_attr\_t server\_attr, globus\_xio\_stack\_t stack)\
 globus\_result\_t **globus\_xio\_server\_get\_contact\_string** (globus\_xio\_server\_t server, char \*\*contact\_string)\
 globus\_result\_t **globus\_xio\_server\_register\_close** (globus\_xio\_server\_t server, **globus\_xio\_server\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_server\_close** (globus\_xio\_server\_t server)\
 globus\_result\_t **globus\_xio\_server\_cntl** (globus\_xio\_server\_t server, globus\_xio\_driver\_t driver, int cmd,...)\
 globus\_result\_t **globus\_xio\_server\_accept** (globus\_xio\_handle\_t \*out\_handle, globus\_xio\_server\_t server)\
 globus\_result\_t **globus\_xio\_server\_register\_accept** (globus\_xio\_server\_t server, **globus\_xio\_accept\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_handle\_create** (globus\_xio\_handle\_t \*handle, globus\_xio\_stack\_t stack)\
 globus\_result\_t **globus\_xio\_data\_descriptor\_init** (globus\_xio\_data\_descriptor\_t \*data\_desc, globus\_xio\_handle\_t handle)\
 globus\_result\_t **globus\_xio\_data\_descriptor\_destroy** (globus\_xio\_data\_descriptor\_t data\_desc)\
 globus\_result\_t **globus\_xio\_data\_descriptor\_cntl** (globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_driver\_t driver, int cmd,...)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (globus\_xio\_handle\_t handle, globus\_xio\_driver\_t driver, int cmd,...)\
 globus\_result\_t **globus\_xio\_register\_open** (globus\_xio\_handle\_t handle, const char \*contact\_string, globus\_xio\_attr\_t attr, **globus\_xio\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_open** (globus\_xio\_handle\_t handle, const char \*contact\_string, globus\_xio\_attr\_t attr)\
 globus\_result\_t **globus\_xio\_register\_read** (globus\_xio\_handle\_t handle, globus\_byte\_t \*buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, **globus\_xio\_data\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_read** (globus\_xio\_handle\_t handle, globus\_byte\_t \*buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_size\_t \*nbytes, globus\_xio\_data\_descriptor\_t data\_desc)\
 globus\_result\_t **globus\_xio\_register\_readv** (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \*iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, **globus\_xio\_iovec\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_readv** (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \*iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_size\_t \*nbytes, globus\_xio\_data\_descriptor\_t data\_desc)\
 globus\_result\_t **globus\_xio\_register\_write** (globus\_xio\_handle\_t handle, globus\_byte\_t \*buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, **globus\_xio\_data\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_write** (globus\_xio\_handle\_t handle, globus\_byte\_t \*buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_size\_t \*nbytes, globus\_xio\_data\_descriptor\_t data\_desc)\
 globus\_result\_t **globus\_xio\_register\_writev** (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \*iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, **globus\_xio\_iovec\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_writev** (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \*iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_size\_t \*nbytes, globus\_xio\_data\_descriptor\_t data\_desc)\
 globus\_result\_t **globus\_xio\_register\_close** (globus\_xio\_handle\_t handle, globus\_xio\_attr\_t attr, **globus\_xio\_callback\_t** cb, void \*user\_arg)\
 globus\_result\_t **globus\_xio\_close** (globus\_xio\_handle\_t handle, globus\_xio\_attr\_t attr)\
 globus\_result\_t **globus\_xio\_handle\_create\_from\_url** (globus\_xio\_handle\_t \*out\_h, const char \*scheme, globus\_xio\_attr\_t attr, char \*param\_string)\
 globus\_result\_t **globus\_xio\_driver\_list\_to\_stack\_attr** (globus\_list\_t \*driver\_list, globus\_xio\_stack\_t stack, globus\_xio\_attr\_t attr)\
 Add a list of driver entries to a stack.  globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_LOCAL\_CONTACT**, char \*\*contact\_string\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_LOCAL\_NUMERIC\_CONTACT**, char \*\*contact\_string\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_REMOTE\_CONTACT**, char \*\*contact\_string\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_REMOTE\_NUMERIC\_CONTACT**, char \*\*contact\_string\_out)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_SEEK**, globus\_off\_t offset)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_SET\_STRING\_OPTIONS**, char \*config\_string)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_STRING\_OPTIONS**, char \*\*config\_string)\
 globus\_result\_t **globus\_xio\_handle\_cntl** (handle, driver, **GLOBUS\_XIO\_GET\_DRIVER\_NAME**, const char \*\*driver\_name)\

## Detailed Description

Globus XIO API.

## Typedef Documentation

### typedef void(\* globus\_xio\_accept\_callback\_t) (globus\_xio\_server\_t server, globus\_xio\_handle\_t handle, globus\_result\_t result, void \*user\_arg)

Callback signature for accept.

When a registered accept operation completes the users function of this signature is called.

**Parameters**

*server* The server object on which the accept was registered.\
 *handle* The newly created handle that was created by the accept operation.\
 *result* A result code indicating the success of the accept operation. GLOBUS\_SUCCESS indicates a successful accept.\
 *user\_arg* A user argument that is threaded from the registration to the callback.

### typedef void(\* globus\_xio\_callback\_t) (globus\_xio\_handle\_t handle, globus\_result\_t result, void \*user\_arg)

globus\_xio\_callback\_t

This callback is used for the open and close asynchronous operations.

### typedef void(\* globus\_xio\_data\_callback\_t) (globus\_xio\_handle\_t handle, globus\_result\_t result, globus\_byte\_t \*buffer, globus\_size\_t len, globus\_size\_t nbytes, globus\_xio\_data\_descriptor\_t data\_desc, void \*user\_arg)

globus\_xio\_data\_callback\_t

This callback is used for asynchronous operations that send or receive data.

On EOF, result\_t will be of type GLOBUS\_XIO\_ERROR\_EOF

### typedef void(\* globus\_xio\_iovec\_callback\_t) (globus\_xio\_handle\_t handle, globus\_result\_t result, globus\_xio\_iovec\_t \*iovec, int count, globus\_size\_t nbytes, globus\_xio\_data\_descriptor\_t data\_desc, void \*user\_arg)

globus\_xio\_iovec\_callback\_t

This callback is used for asynchronous operations that send or receive data with an iovec structure.

On EOF, result\_t will be of type GLOBUS\_XIO\_ERROR\_EOF

### typedef enum globus\_i\_xio\_op\_type\_e globus\_xio\_operation\_type\_t

Operation types

An enumeration of operation types. Used in the timeout callback to indicate what operation typed timedout.

### typedef void(\* globus\_xio\_server\_callback\_t) (globus\_xio\_server\_t server, void \*user\_arg)

Server callback signature.

This is the generic server callback signature. It is currently only used for the register close operation.

### typedef globus\_bool\_t(\* globus\_xio\_timeout\_callback\_t) (globus\_xio\_handle\_t handle, globus\_xio\_operation\_type\_t type, void \*user\_arg)

The timeout callback function signature.

**Parameters**

*handle* The handle the handle on which the timeout operation was requested.\
 *type* The type of operation that timed out: GLOBUS\_XIO\_OPERATION\_OPEN GLOBUS\_XIO\_OPERATION\_CLOSE GLOBUS\_XIO\_OPERATION\_READ GLOBUS\_XIO\_OPERATION\_WRITE\
 *user\_arg* A user arg threaded through to the callback.

## Enumeration Type Documentation

### enum globus\_i\_xio\_op\_type\_e

Operation types

An enumeration of operation types. Used in the timeout callback to indicate what operation typed timedout.

### enum globus\_xio\_handle\_cmd\_t

doxygen varargs filter stuff Common driver handle cntls.

**Enumerator**

- *GLOBUS\_XIO\_GET\_LOCAL\_CONTACT*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_GET\_LOCAL\_NUMERIC\_CONTACT*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_GET\_REMOTE\_CONTACT*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_GET\_REMOTE\_NUMERIC\_CONTACT*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_SEEK*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_SET\_STRING\_OPTIONS*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_GET\_STRING\_OPTIONS*

  *See usage for:* **globus\_xio\_handle\_cntl**

- *GLOBUS\_XIO\_GET\_DRIVER\_NAME*

  *See usage for:* **globus\_xio\_handle\_cntl**

## Function Documentation

### globus\_result\_t globus\_xio\_attr\_cntl (globus\_xio\_attr\_t attr, globus\_xio\_driver\_t driver, int cmd, ...)

*Manipulate the values associated in the attr.*

*This function provides a means to access the attr structure. What exactly this function does is determined by the value in the parameter cmd and the value of the parameter driver. When the driver parameter is NULL it indicates that this function applies to general Globus XIO values. If it is not NULL it indicates that the function will effect driver specific values. Each driver is responsible for defining its own enumeration of values for cmd and the var args associated with that command.* \

**Parameters**

*attr the attribute structure to be manipulated.*\
 *driver This parameter indicates which driver the user would like to perform the requested operation. If this parameter is NULL this request will be scoped to general attribute functions.*\
 *cmd an enum that determines what specific operation the user is requesting. Each driver will determine the value for this enumeration.*

### globus\_result\_t globus\_xio\_attr\_copy (globus\_xio\_attr\_t \* dst, globus\_xio\_attr\_t src)

*Copy an attribute structure.*

### globus\_result\_t globus\_xio\_attr\_destroy (globus\_xio\_attr\_t attr)

*Clean up resources associated with an attribute.*

**Parameters**

*attr Upon completion of this function all resources associated with this structure will returned to the system and the attr will no longer be valid.*

### globus\_result\_t globus\_xio\_attr\_init (globus\_xio\_attr\_t \* attr)

*Initialize a Globus XIO attribute.*

**Parameters**

*attr upon return from this function this out parameter will be initialized. Once the user is finished with the attribute they should make sure they destroy it in order to free resources associated with it.*

### globus\_result\_t globus\_xio\_close (globus\_xio\_handle\_t handle, globus\_xio\_attr\_t attr)

*Blocking close*

### globus\_result\_t globus\_xio\_data\_descriptor\_cntl (globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_driver\_t driver, int cmd, ...)

*Touch driver specific data in data descriptors*

*This function allows the user to communicate directly with a driver in association with a data descriptors. The driver defines what operations can be preformed.*

### globus\_result\_t globus\_xio\_data\_descriptor\_destroy (globus\_xio\_data\_descriptor\_t data\_desc)

*clean up a data descriptor.*

### globus\_result\_t globus\_xio\_data\_descriptor\_init (globus\_xio\_data\_descriptor\_t \* data\_desc, globus\_xio\_handle\_t handle)

*Initialize a data descriptor*

**Parameters**

*data\_desc An out parameter. The data descriptor to be initialized.*\
 *handle The handle this data descriptor will be used with. This parameter is require in order to optimize the code handling the data descriptors use.*

### globus\_result\_t globus\_xio\_driver\_list\_to\_stack\_attr (globus\_list\_t \* driver\_list, globus\_xio\_stack\_t stack, globus\_xio\_attr\_t attr)

*Add a list of driver entries to a stack. This function walks a list of* `globus_xio_driver_list_ent_t *` *values passed as the driver\_list parameter, and pushes them onto the XIO stack passed as the stack parameter and sets attributes for those drivers in the attr passed as the attr parameter to this function.*

**Parameters**

*driver\_list A list of driver list entries in stack order (transport, followed by transform). Each entry may contain a option string for attributes to set for this driver.* \
 *stack A pointer to an XIO stack which will have the drivers pushed onto. It must be previously initialized by calling* **globus\_xio\_stack\_init()***. This function does not overwrite the stack, so the drivers passed in the driver list will be pushed on top of any existing drivers in the stack.* \
 *attr A pointer to an XIO attribute which will have the driver-specific string options set on it, after the drivers are pushed onto the stack. The opts field of the list entries are passed to the GLOBUS\_XIO\_SET\_STRING\_OPTIONS attr control function. This value must be previously initialized by calling* **globus\_xio\_attr\_init()***. Errors from the attr control function are ignored.*

**Returns**

*If the driver can not be pushed onto the stack, an error result is returned; otherwise, GLOBUS\_SUCCESS. If an error occurs, some of the entries MAY be pushed on to the stack and some attributes may have been set in the attr. Both should be destroyed by the caller.*

### globus\_result\_t globus\_xio\_handle\_cntl (globus\_xio\_handle\_t handle, globus\_xio\_driver\_t driver, int cmd, ...)

*Touch driver specific information in a handle object.*

*This function allows the user to communicate directly with a driver in association with a handle object. The driver defines what operations can be preformed.*

*pass the driver to control a specific driver pass NULL for driver for XIO specific cntls pass GLOBUS\_XIO\_QUERY for driver to try each driver in order until success*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_DRIVER\_NAME, const char \*\* driver\_name)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the driver specific configuration string. The format of the string is defined by the driver. It is typically a set of key=value pairs*

**Parameters**

*driver\_name The driver name.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_LOCAL\_CONTACT, char \*\* contact\_string\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get local connection info.*

**Parameters**

*contact\_string\_out A pointer to a contact string for the local end of a connected handle. Where possible, it will be in symbolic form (FQDN).*

*The user must free the returned string.*

**See also**

**globus\_xio\_server\_get\_contact\_string()**

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_LOCAL\_NUMERIC\_CONTACT, char \*\* contact\_string\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get local connection info.*

**Parameters**

*contact\_string\_out A pointer to a contact string for the local end of a connected handle. Where possible, it will be in numeric form. (IP)*

*The user must free the returned string.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_REMOTE\_CONTACT, char \*\* contact\_string\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get remote connection info.*

**Parameters**

*contact\_string\_out A pointer to a contact string for the remote end of a connected handle. Where possible, it will be in symbolic form (FQDN).*

*The user must free the returned string.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_REMOTE\_NUMERIC\_CONTACT, char \*\* contact\_string\_out)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get remote connection info.*

**Parameters**

*contact\_string\_out A pointer to a contact string for the remote end of a connected handle. Where possible, it will be in numeric form. (IP)*

*The user must free the returned string.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_GET\_STRING\_OPTIONS, char \*\* config\_string)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the driver specific configuration string. The format of the string is defined by the driver. It is typically a set of key=value pairs*

**Parameters**

*config\_string The driver specific parameter string.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_SEEK, globus\_off\_t offset)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Reposition read/write offset.*

**Parameters**

*offset Specify the desired offset.*

### globus\_result\_t globus\_xio\_handle\_cntl (handle, driver, GLOBUS\_XIO\_SET\_STRING\_OPTIONS, char \* config\_string)

*This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the driver specific configuration string. The format of the string is defined by the driver. It is typically a set of key=value pairs*

**Parameters**

*config\_string The driver specific parameter string.*

### globus\_result\_t globus\_xio\_handle\_create (globus\_xio\_handle\_t \* handle, globus\_xio\_stack\_t stack)

*Initialize a handle for client opens*

*This function will initialize a handle for active opens (client side connections).*

### globus\_result\_t globus\_xio\_handle\_create\_from\_url (globus\_xio\_handle\_t \* out\_h, const char \* scheme, globus\_xio\_attr\_t attr, char \* param\_string)

*Initializes a handle based on the scheme given.*

**Parameters**

*out\_h An uninitialized handle that will be initialized in the function to correspond to the scheme given. This handle should be used for any I/O operations.*\
 *scheme A string containing the protocol which the handle should be initialized to. The string can either be a protocol by itself, for example, 'http', or a complete scheme such as 'http://www.example.com'.*\
 *attr Attribute to be used for setting parameter string. It is initialized by the function. Can be NULL if attributes are not being used.*\
 *param\_string A string containing attributes to be set for the drivers associated with the scheme. This should be in the form 'protocol1:option1=value1;option2=value2,protocol2:option1=value1;*\
        *option2=value2' Can be NULL if attributes are not being used.*

### globus\_result\_t globus\_xio\_open (globus\_xio\_handle\_t handle, const char \* contact\_string, globus\_xio\_attr\_t attr)

*Blocking open*

### globus\_result\_t globus\_xio\_read (globus\_xio\_handle\_t handle, globus\_byte\_t \* buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_size\_t \* nbytes, globus\_xio\_data\_descriptor\_t data\_desc)

*Read data from a handle*

### globus\_result\_t globus\_xio\_readv (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \* iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_size\_t \* nbytes, globus\_xio\_data\_descriptor\_t data\_desc)

*Read data from a handle into a globus\_xio\_iovec\_t (struct iovec)*

### globus\_result\_t globus\_xio\_register\_close (globus\_xio\_handle\_t handle, globus\_xio\_attr\_t attr, globus\_xio\_callback\_t cb, void \* user\_arg)

*Close a handle*

*This functions servers as a destroy for the handle. As soon as the operations completes (the callback is called). The handle is destroyed.*

**Parameters**

*handle the handle to be closed.*\
 *attr how to close attribute*\
 *cb The function to be called when the close operation completes.*\
 *user\_arg A user pointer that will be threaded through to the callback.*

### globus\_result\_t globus\_xio\_register\_open (globus\_xio\_handle\_t handle, const char \* contact\_string, globus\_xio\_attr\_t attr, globus\_xio\_callback\_t cb, void \* user\_arg)

*Open a handle*

*Creates an open handle based on the state contained in the given stack.*

*No operation can be preformed on a handle until it is initialized and then opened. If an already open handle used the information contained in that handle will be destroyed.*

**Parameters**

*handle The handle created with* **globus\_xio\_handle\_create()** *or* **globus\_xio\_server\_register\_accept()** *that is to be opened.*\
 *attr how to open attribute. can be NULL*\
 *cb The function to be called when the open operation completes.*\
 *user\_arg A user pointer that will be threaded through to the callback.*\
 *contact\_string An url describing the resource. NULL is allowed. Drivers interpret the various parts of this url as described in their documentation. An alternative form is also supported: if contact\_string does not specify a scheme (e.g. http://) and it contains a ':', it will be parsed as a host:port pair. if it does not contain a ':', it will be parsed as the path*

*the following are examples of valid formats:*

```
   <path to file>
   host-name ':' <service or port>
   'file:' <path to file>
   <scheme> '://' [ '/' [ <path to resource> ]  ]
   <scheme> '://' location [ '/' [ <path to resource> ] ]
     location:
         [ auth-part ] host-part
     auth-part:
         <user> [ ':' <password> ] '@'
     host-part:
         [ '<' <subject> '>' ] host-name [ ':' <port or service> ]
     host-name:
         <hostname> | <dotted quad> | '[' <ipv6 address> ']'
```

*Except for use as the above delimiters, the following special characters MUST be encoded with the %HH format where H == hex char.*

```
   '/' and '@' in location except subject
   '<' and '>' in location
   ':' everywhere except ipv6 address and subject
   '%' everywhere (can be encoded with %HH or %%)
```

### globus\_result\_t globus\_xio\_register\_read (globus\_xio\_handle\_t handle, globus\_byte\_t \* buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_data\_callback\_t cb, void \* user\_arg)

*Read data from a handle*

### globus\_result\_t globus\_xio\_register\_readv (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \* iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_iovec\_callback\_t cb, void \* user\_arg)

*Read data from a handle into a globus\_xio\_iovec\_t (struct iovec)*

### globus\_result\_t globus\_xio\_register\_write (globus\_xio\_handle\_t handle, globus\_byte\_t \* buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_data\_callback\_t cb, void \* user\_arg)

*Write data to a handle*

### globus\_result\_t globus\_xio\_register\_writev (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \* iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_xio\_data\_descriptor\_t data\_desc, globus\_xio\_iovec\_callback\_t cb, void \* user\_arg)

*Write data to a handle from a globus\_xio\_iovec\_t (struct iovec)*

### globus\_result\_t globus\_xio\_server\_accept (globus\_xio\_handle\_t \* out\_handle, globus\_xio\_server\_t server)

*Accept a connection*

*This function will accept a connection on the given server object and the parameter out\_handle will be valid if the function returns successfully.*

### globus\_result\_t globus\_xio\_server\_close (globus\_xio\_server\_t server)

*A blocking server close*

### globus\_result\_t globus\_xio\_server\_cntl (globus\_xio\_server\_t server, globus\_xio\_driver\_t driver, int cmd, ...)

*Touch driver specific information in a server object.*

*This function allows the user to communicate directly with a driver in association with a server object. The driver defines what operations can be preformed.*

### globus\_result\_t globus\_xio\_server\_create (globus\_xio\_server\_t \* server, globus\_xio\_attr\_t server\_attr, globus\_xio\_stack\_t stack)

*Create a server object.*

*This function allows the user to create a server object which can then be used to accept connections.*

**Parameters**

*server An out parameter. Once the function successfully returns this will point to a valid server object.*\
 *server\_attr an attribute structure used to alter the default server initialization. This will mostly be used in a driver specific manner. can be NULL.*\
 *stack*

### globus\_result\_t globus\_xio\_server\_get\_contact\_string (globus\_xio\_server\_t server, char \*\* contact\_string)

*get contact string*

*This function allows the user to get the contact string for a server. this string could be used as the contact string for the client side.*

**Parameters**

*server An initialized server handle created with* **globus\_xio\_server\_create()**\
 *contact\_string an out variable. Will point to a newly allocated string on success. must be freed by the caller.*

### globus\_result\_t globus\_xio\_server\_register\_accept (globus\_xio\_server\_t server, globus\_xio\_accept\_callback\_t cb, void \* user\_arg)

*Asynchronous accept.*

*This function posts an nonblocking accept. Once the operation has completed the user function pointed to by the parameter cb is called.*

### globus\_result\_t globus\_xio\_server\_register\_close (globus\_xio\_server\_t server, globus\_xio\_server\_callback\_t cb, void \* user\_arg)

*post a close on a server object*

*This function registers a close operation on a server. When the user function pointed to by parameter cb is called the server object is closed.*

### globus\_result\_t globus\_xio\_stack\_copy (globus\_xio\_stack\_t \* dst, globus\_xio\_stack\_t src)

*Copy a stack object*

### globus\_result\_t globus\_xio\_stack\_destroy (globus\_xio\_stack\_t stack)

*Destroy a stack object.*

### globus\_result\_t globus\_xio\_stack\_init (globus\_xio\_stack\_t \* stack, globus\_xio\_attr\_t stack\_attr)

*Initialize a stack object*

### globus\_result\_t globus\_xio\_stack\_push\_driver (globus\_xio\_stack\_t stack, globus\_xio\_driver\_t driver)

*Push a driver onto a stack.*

*No attrs are associated with a driver. The stack represents the ordered lists of transform drivers and 1 transport driver. The transport driver must be pushed on first.*

### globus\_result\_t globus\_xio\_write (globus\_xio\_handle\_t handle, globus\_byte\_t \* buffer, globus\_size\_t buffer\_length, globus\_size\_t waitforbytes, globus\_size\_t \* nbytes, globus\_xio\_data\_descriptor\_t data\_desc)

*Write data to a handle*

### globus\_result\_t globus\_xio\_writev (globus\_xio\_handle\_t handle, globus\_xio\_iovec\_t \* iovec, int iovec\_count, globus\_size\_t waitforbytes, globus\_size\_t \* nbytes, globus\_xio\_data\_descriptor\_t data\_desc)

*Write data to a handle from a globus\_xio\_iovec\_t (struct iovec)*

## Author

*Generated automatically by Doxygen for globus\_xio from the source code.*
