YCloseConnection - disconnects from Y server
#include <Y2/Y.h>
#include <Y2/Ylib.h>
void YCloseConnection(
YConnection *connection,
Boolean no_shutdown
)
The YCloseConnection function closes the connect to the Y server pointed to by connection. After calling this function, the given pointer connection should no longer be referanced.
You will not receive a YDisconnect event after calling this function, since the connection has been terminated and there is no way to receive further YEvents.
#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);
YOpenConnection(3) YShutdownServer(3)