YOpenConnection (3)
Name
YOpenConnection - connect to Y server
Syntax
#include <Y2/Y.h>
#include <Y2/Ylib.h>
YConnection *YOpenConnection(
const char *start_arg,
const char *con_arg
)
Arguments
start_arg
Specifies the null terminated command to be executed to start
the Y server. This command is only used if the Y server does not
appear to be currently running. If you do not want the Y server
to be started if it is not running, then just pass NULL.
con_arg
Specifies the connect argument to connect to the Y server. The
format is a null terminated string of the format
“<address>:<port>” where <address> specifies the address of the
Y server and <port> specifies the port number it is polling for
incoming connections on. An example connect argument would be
“127.0.0.1:9433” which would connect to localhost on port 9433
(standard port number).
Description
The YOpenConnection opens a new connection to the Y server.
Return Value
The YOpenConnection returns a YConnection pointer that serves as the connection to the Y server and that contains all the information about that Y server. It can also return NULL if it failed to start the Y server (as needed or requested) and/or connect to it.
Example
#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>
int main(int argc, char *argv[])
{
YConnection *con = YOpenConnection(
“/usr/sbin/starty",
“127.0.0.1:9433"
);
if(con == NULL)
return(1)
;
YCloseConnection(con, False);
return(0);
}
See Also
YCloseConnection(3) YShutdownServer(3)
Losowe
- smc91c92_cs (4)
- log4c_priority_to_int (3)
- synce (1)
- XtScreenDatabase (3)
- BIO_get_callback_arg (3ssl)
- ikslint (1)
- qwavfade (1)
- CursesW.KeyDown (3kaya)
- htpurge (1)
- globus_gssapi_error_accessor (3)
- im_prepare_to (3)
- wwwoffle-audit-usage (8)
- root-tail (1)
- XkbSetBounceKeysDelay (3)
- mod_firmware_load (9)
- g.parser (1grass)
- ns_free (3aolserver)
- toascii (3posix)
- clig_Int (7)
- NtQueryTimer (3w)
