| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Functions
Galil Connect
C » Connection

Connect to or host a remote gcaps server. More...

## Functions
gclib_result | gclib_list_servers (char *servers, size_t len)
| List available gcaps servers separated by newline.
gclib_result | gclib_server (char *name, size_t len)
| Current gcaps server.
gclib_result | gclib_set_server (const char *name)
| Set gcaps server.
gclib_result | gclib_published (char *name, size_t len)
| Provides published status of local gcaps server.
gclib_result | gclib_set_published (const char *name)
| Set published status of local gcaps server.

## Detailed Description

Connect to or host a remote gcaps server.

While connected, applicable gclib functions will run on the remote gcaps server. This can be useful for accessing closed or distant systems.

## Function Documentation

## ◆ gclib_list_servers()

gclib_result gclib_list_servers | ( | char * | servers,
|  | size_t | len )

List available gcaps servers separated by newline.

Parameters

  servers | Output buffer.
  len | Length of output buffer.

Returns
  GCLIB_BUFFER_TOO_SMALL if output does not fit in buffer.

## ◆ gclib_server()

gclib_result gclib_server | ( | char * | name,
|  | size_t | len )

Current gcaps server.

If connected to the local gcaps server, returns an empty string.

Parameters

  name | Output buffer.
  len | Length of output buffer.

Returns
  GCLIB_BUFFER_TOO_SMALL if output does not fit in buffer.

## ◆ gclib_set_server()

gclib_result gclib_set_server | ( | const char * | name | ) |

Set gcaps server.

Parameters

  name | Name of gcaps server, obtained from gclib_list_servers(). Pass NULL to use the local gcaps server.

Returns
  GCLIB_INVALID_ARGUMENT if name does not appear to be a valid server.

## ◆ gclib_published()

gclib_result gclib_published | ( | char * | name,
|  | size_t | len )

Provides published status of local gcaps server.

Parameters

  name | If published, will contain name of local gcaps server. NULL otherwise.
  len | Length of name buffer.

Returns
  GCLIB_NOT_CONNECTED if unable to reach gcaps.

## ◆ gclib_set_published()

gclib_result gclib_set_published | ( | const char * | name | ) |

Set published status of local gcaps server.

Parameters

  name | Name of server to publish. If NULL, server will be unpublished.

Returns
  GCLIB_NOT_CONNECTED if unable to reach gcaps.