Sun Java Communications Suite 5 Event Notification Service Guide

upub_init

Purpose

Creates the publisher.

This function allocates the upub object and sets up the thread dispatcher. The thread dispatcher can be provided by the application if the application already has one. This will have the advantage of not creating a thread dedicated to this API.

Note: If a connection-based transport is used, the connection to the notification service is not set up here. This is deferred to the first time a notification is actually published.

Syntax

upub_t *upub_init(void *gdc,
                             const char *host, unisgned short port,
                             int num_workers);

Parameters

gdc

GDisp context (thread dispatcher). 

host

Notification server host name. 

port

Notification server port. 

num_workers

Number of parallel sessions. 

Returns

The upub ready to be used.