GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Listening on Endpoints Up: The Streaming Package Previous: The Streaming Package   Contents

Constructing and Destroying Endpoint Instances

As instances of the class GATEndpoint are used to create connections between processes the first step that an application programmer has to take in using the streaming package is to learn how to create and destroy GATEndpoint instances. Fortunately this is relatively simple. One only has to make a call to the following function

GATEndpoint GATEndpoint_Create(GATContext context, GATPreferences_const preferences)

to create a GATEndpoint instance. The arguments to this function, an instance of the class GATContext and the class GATPreferences, are classes we've encountered before. So, we will pass over them in silence. Upon success this function returns a GATEndpoint associated with the passed arguments. Upon failure it returns a NULL.

To destroy a so created GATEndpoint instance one calls the function

void GATEndpoint_Destroy(GATEndpoint *endpoint)

It takes a pointer to the GATEndpoint instance to destroy. Upon completion all resources held by the passed GATEndpoint instance are freed.



Andre Merzky 2004-05-13