|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
The base class for building a Server-Client connection. More...
#include <connection.h>
Public Member Functions | |
| Connection * | AllocateWebServerConnection (const char *const full_uri_s, CurlMode curl_mode) |
| Allocate a WebConnection to a Server. More... | |
| Connection * | AllocaterRawClientConnection (int server_socket_fd) |
| Allocate a RawConnection to a Client. More... | |
| const char * | GetConnectionData (Connection *connection_p) |
| Get the data stored in a Connection's buffer. More... | |
| void | FreeConnection (Connection *connection_p) |
| Free a Connection. More... | |
| const char * | MakeRemoteJsonCallViaConnection (Connection *connection_p, const json_t *req_p) |
| Send JSON-based data over a Connection. More... | |
| bool | SetConnectionCredentials (Connection *connection_p, const char *username_s, const char *password_s) |
| json_t * | CallServices (json_t *client_results_p, const User *user_p, Connection *connection_p) |
| Make a call from a Client to a Server. More... | |
| struct Connection * | AllocateRawServerConnection (const char *const hostname_s, const char *const port_s) |
| Allocate a RawConnection to a Server. More... | |
Data Fields | |
| uint32 | co_id |
| The internal id for this Connection. More... | |
| ConnectionType | co_type |
| The ConnectionType for this Connection. More... | |
The base class for building a Server-Client connection.
| Connection * AllocateWebServerConnection | ( | const char *const | full_uri_s, |
| CurlMode | curl_mode | ||
| ) |
Allocate a WebConnection to a Server.
| full_uri_s | The URI to connect to. |
NULL upon error. | Connection * AllocaterRawClientConnection | ( | int | server_socket_fd | ) |
Allocate a RawConnection to a Client.
| server_socket_fd | The Client's socket_fd on the Server. |
NULL upon error. | const char * GetConnectionData | ( | Connection * | connection_p | ) |
Get the data stored in a Connection's buffer.
| connection_p | The Connection to get the data from. |
| void FreeConnection | ( | Connection * | connection_p | ) |
Free a Connection.
| connection_p | The Connection to free. |
| const char * MakeRemoteJsonCallViaConnection | ( | Connection * | connection_p, |
| const json_t * | req_p | ||
| ) |
Send JSON-based data over a Connection.
| connection_p | The Connection to use. |
| req_p | The data to send. |
NULL upon error. | bool SetConnectionCredentials | ( | Connection * | connection_p, |
| const char * | username_s, | ||
| const char * | password_s | ||
| ) |
| json_t * CallServices | ( | json_t * | client_results_p, |
| const User * | user_p, | ||
| Connection * | connection_p | ||
| ) |
Make a call from a Client to a Server.
| client_results_p | The request data to send from the Client to the Server. |
| user_p | An optional set of User to send for authentication if needed. |
| connection_p | The connection to the Server. |
NULL upon error. | struct Connection * AllocateRawServerConnection | ( | const char *const | hostname_s, |
| const char *const | port_s | ||
| ) |
Allocate a RawConnection to a Server.
| hostname_s | The hostname of the Server to connect to. |
| port_s | The Server's port to connect to. |
NULL upon error. | uint32 co_id |
The internal id for this Connection.
| ConnectionType co_type |
The ConnectionType for this Connection.