YCloseConnection(3)

YCloseConnection3

Disconnects from y server

Usage

#include <Y2/Y.h>
#include <Y2/Ylib.h>

void YCloseConnection(

YConnection *connection,

Boolean no_shutdown
)

Arguments

connection

Specifies the connection to the Y server, obtained by a call to YOpenConnection.

no_shutdown

If True then the Y server will be left running. If False then if the original call to YOpenConnection which obtained the connection pointer started the Y server then the Y server will be shut down. However if the Y server was already running before the call to call to YOpenConnection then the Y server will not be shut down. The default and standard value is False.

Overview

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.

Examples

#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);
}

Releases

6 releases since Debian 2.2 (Potato); the text changed 3 times.

  1. 2.2
  2. 3.0
  3. 3.1–5.0
  4. 6.0

From liby-dev 2.14.5-7 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.