SP_connect man page on DragonFly

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

SP_CONNECT(3)			 User Manuals			 SP_CONNECT(3)

NAME
       SP_connect - Connect an application to a daemon

SYNOPSIS
       #include <sp.h>
       int  SP_connect( const char *spread_name, const char *private_name, int
       priority, int group_membership, mailbox *mbox, char *private_group);

DESCRIPTION
       SP_connect is the initial call an application must make to establish  a
       connection  with a Spread daemon.  All other spread calls must refer to
       a valid mbox returned by this function.

       The spread_name is the name of the Spread daemon	 to  connect  to.   It
       should be a string in one of the following forms:

	      4803   This  will	 connect  to  the  Spread  daemon on the local
		     machine running on port 4803.  This form cannot  be  used
		     to connect to a Windows95/NT machine.

	      4803@localhost
		     This  will also connect to the Spread daemon on the local
		     machine running on port 4803.  This form can be  used  on
		     Windows95/NT machines.

	      4803@host.domain.edu or 4803@128.220.221.99
		     This  will	 connect  to  the machine identified by either
		     domain name or IP address at the specified port.

       The private_name is the name this connection would like to be known as.
       It  must	 be unique on the machine running the spread daemon.  The name
       can be of at most MAX_PRIVATE_NAME characters, with the same  character
       restrictions  as a group name (mainly it cannot contain the '#' charac‐
       ter). If the application does not care what name it uses, it  can  pass
       in  a  NULL pointer into this field and the daemon will assign the con‐
       nection a unique, random name.

       The priority is a 0/1 flag for whether this connection will be a	 "Pri‐
       ority" connection or not. Currently this has no effect.

       The  group_membership  is a boolean integer.  If 1 then the application
       will receive group membership messages for this connection, if  0  then
       the application will not receive any membership change messages.

       The  mbox should be a pointer to a mailbox variable.  After the SP_con‐
       nect call returns this variable will hold the mbox for the connection.

       The private_group should be a pointer to a string big enough to hold at
       least  MAX_GROUP_NAME  characters.   After  the Connect call returns it
       will contain the private group name of  this  connection.   This	 group
       name can be used to send unicast messages to this connection and no one
       can join this special group.

RETURN VALUES
       Returns ACCEPT_SESSION on success or one of the following errors ( <  0
       ):

       ILLEGAL_SPREAD
	       The  spread_name	 given to connect to was illegal for some rea‐
	       son. Usually because it was a unix socket on  Windows95/NT,  an
	       improper format for a host or an illegal port number

       COULD_NOT_CONNECT
	       Lower  level  socket  calls failed to allow a connection to the
	       specified spread daemon right now.

       CONNECTION_CLOSED
	       During communication to establish the connection errors occured
	       and the setup could not be completed.

       REJECT_VERSION
	       The daemon or library has a version mismatch.

       REJECT_NO_NAME
	       This  is a protocol error which should not occur if the connec‐
	       tion request is sent correctly to the daemon. It means that the
	       length  of  the user name was not sent (if no user name is pro‐
	       vided a length of 0 must be sent).

       REJECT_ILLEGAL_NAME
	       Name provided violated some  requirement	 (length  or  used  an
	       illegal character)

       REJECT_NOT_UNIQUE
	       Name  provided  is  not	unique	on  this  daemon.  Recommended
	       response is to try again with a different name.

BUGS
       None.

AUTHOR
       Yair Amir <yairamir@cnds.jhu.edu>
       Jonathan Stanton <jonathan@cnds.jhu.edu>

SEE ALSO
       libspread(3)

SPREAD				   JULY 1998			 SP_CONNECT(3)
[top]

List of man pages available for DragonFly

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