libmctProgrammer’s Manual

mct_session_close(3)

Name

mct_session_close — Destroy an MCT session

Synopsis

#include <sys/types.h>
#include <sys/socket.h>

#include <mct/session.h>

int mct_session_close(struct mct *mct, int s);

Description

Request that mctd destroy a session previously created by a call to mct_bridge.

Once destroyed, the session ID is no longer valid for subsequent calls. Further sessions may then be created which re-use the same ID.

Return Value

The mct_session_close() function returns 0 on success. On failure this function returns -1 and errno is set accordingly.

Errors

The mct_session_close() function may fail for any of the reasons the socket API may produce.

In addition, mct_session_close() may fail for any of the reasons documented by mct_ipc.

In addition, mct_session_close() may fail for the following reasons:

EINVAL

The given session ID is not valid.

See Also

mctd, mct, mct_ipc, mct_bridge.