DC_PLUG_new man page on YellowDog

Man page or keyword search:  
man Server   18644 pages
apropos Keyword Search (all sections)
Output format
YellowDog logo
[printable version]

DC_PLUG_NEW(2)			   distcache			DC_PLUG_NEW(2)

NAME
       DC_PLUG_new, DC_PLUG_free, DC_PLUG_to_select, DC_PLUG_io - basic
       DC_PLUG functions

SYNOPSIS
	#include <distcache/dc_plug.h>

	DC_PLUG *DC_PLUG_new(NAL_CONNECTION *conn, unsigned int flags);
	int DC_PLUG_free(DC_PLUG *plug);
	void DC_PLUG_to_select(DC_PLUG *plug, NAL_SELECTOR *sel);
	int DC_PLUG_io(DC_PLUG *plug, NAL_SELECTOR *sel);

DESCRIPTION
       DC_PLUG_new() allocates and initialises a DC_PLUG structure encapsulat‐
       ing the specified connection. The flags parameter is zero or a bitmask
       combining one or more of the following flags;

	#define DC_PLUG_FLAG_TO_SERVER	       (unsigned int)0x0001
	#define DC_PLUG_FLAG_NOFREE_CONN       (unsigned int)0x0002

       If the DC_PLUG_FLAG_TO_SERVER flag is specified, the plug object will
       expect to be sending ``request'' messages and receiving ``response''
       messages, otherwise will default to the opposite sense.

       DC_PLUG_free() frees the DC_PLUG structure and, unless it had been cre‐
       ated with the DC_PLUG_FLAG_NOFREE_CONN flag, will also destroy the con‐
       nection object it encapsulates.

       DC_PLUG_to_select() is used to add a plug object to the sel selector so
       that it can be tested for network events it is waiting on. This will
       automatically handle selection of flags depending on the plug object's
       state. Ie. it will select for writability on its underlying connection
       only if there is data waiting to be sent, and likewise will select for
       readability only if it is ready to receive any data that may have
       arrived.

       DC_PLUG_io() is used to allow network I/O to be performed on a plug
       object's underlying connection depending on the results of the last
       select operation on sel.

RETURN VALUES
       DC_PLUG_new() returns the new plug object on success, otherwise NULL
       for failure.

       DC_PLUG_free() should never fail and should only return non-zero
       results.

       DC_PLUG_to_select() has no return value.

       DC_PLUG_io() return zero on an error, otherwise non-zero.

       None of the DC_PLUG functions sets (or clears) errno because it is
       implemented on top of the libnal library which in turn is an abstrac‐
       tion layer for the system's networking interfaces. As such, any errno
       codes set by failure in system libraries will not be overwritten by
       these functions.

SEE ALSO
       DC_PLUG_read(2) - Provides documentation for other DC_PLUG functions
       also.

       distcache(8) - Overview of the distcache architecture.

       http://www.distcache.org/ - Distcache home page.

AUTHOR
       This toolkit was designed and implemented by Geoff Thorpe for Crypto‐
       graphic Appliances Incorporated. Since the project was released into
       open source, it has a home page and a project environment where devel‐
       opment, mailing lists, and releases are organised. For problems with
       the software or this man page please check for new releases at the
       project web-site below, mail the users mailing list described there, or
       contact the author at geoff@geoffthorpe.net.

       Home Page: http://www.distcache.org

1.4.5				  2004.03.23			DC_PLUG_NEW(2)
[top]

List of man pages available for YellowDog

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net