41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* _____ _ */
|
|
/* packet/send_term.c |_ _|__ _ _| |__ ___ _ _ */
|
|
/* | Project: libp7 | |/ _ \| | | | '_ \ / _ \ | | | */
|
|
/* | | (_) | |_| | | | | __/ |_| | */
|
|
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
|
|
/* Last updated: 2016/10/13 07:33:17 |___/ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include <libp7/internals.h>
|
|
|
|
/**
|
|
* p7_send_term:
|
|
* Send termination packet.
|
|
*
|
|
* Terminates communication.
|
|
*
|
|
* @arg handle the libp7 handle
|
|
* @return if it worked
|
|
*/
|
|
|
|
int p7_send_term(p7_handle_t *handle)
|
|
{
|
|
handle->_env = NULL;
|
|
return (p7_send_basic(handle, p7_pt_terminate, p7_tmt_default, 1));
|
|
}
|
|
|
|
/**
|
|
* p7_send_term_timeout:
|
|
* Send timeouts termination packet.
|
|
*
|
|
* @arg handle the libp7 handle
|
|
* @return if it worked
|
|
*/
|
|
|
|
int p7_send_term_timeout(p7_handle_t *handle)
|
|
{
|
|
handle->_env = NULL;
|
|
return (p7_send_basic(handle, p7_pt_terminate, p7_tmt_timeouts, 1));
|
|
}
|