GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XS_INIT (3)

.ds Aq ’

NAME

xs_init - initialise Crossroads context

CONTENTS

SYNOPSIS

void *xs_init ();

DESCRIPTION

The xs_init() function initialises a Crossroads context.

Thread safety. A context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

The individual sockets within a context are not thread safe — applications may not use a single socket concurrently from multiple threads.

A socket may be migrated from one thread to another, by issuing a full memory barrier between individual calls on the socket. For example, this means applications can create a socket in one thread with xs_socket() and then pass it to a newly created thread as part of thread initialization via a structure passed as an argument to pthread_create().

Context options. Context options may be set prior to creating the first socket within a context, using the xs_setctxopt() function. See xs_setctxopt(3) for details on the available context options.

Multiple contexts. Multiple contexts may coexist within a single application. Thus, an application can use Crossroads directly and at the same time make use of any number of additional libraries or components which themselves make use of Crossroads.

RETURN VALUE

The xs_init() function shall return an opaque handle to the initialised context if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

ERRORS

No error values are defined.

SEE ALSO

xs(7) xs_term(3) xs_setctxopt(3)

AUTHORS

The Crossroads documentation was written by Martin Sustrik <\m[blue]sustrik@250bpm.com\m[][1]> and Martin Lucina <\m[blue]martin@lucina.net\m[][2]>.

NOTES

1. sustrik@250bpm.com  mailto:sustrik@250bpm.com
2. martin@lucina.net  mailto:martin@lucina.net
Search for    or go to Top of page |  Section 3 |  Main Index


Crossroads I/O 1&.2&.0 XS_INIT (3) 04/03/2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.