man YShutdownServer (Fonctions bibliothèques) - disconnects and shuts down Y server
NAME
YShutdownServer - disconnects and shuts down Y server
SYNTAX
#include <Y2/Y.h>
#include <Y2/Ylib.h>
void YShutdownServer(
YConnection *connection
)
ARGUMENTS
- connection
- Specifies the connection to the Y server, obtained by a call to YOpenConnection.
DESCRIPTION
The YShutdownServer function closes the connect to the Y server pointed to by connection. The connection pointer connection passed to this function should not be referanced again.
You will not recieve a YShutdown event after this function is called.
If you only want to close the connection to the Y server then use YCloseConnection.
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);
YShutdownServer(con);
return(0);
}