cake
/
libp7
Archived
1
0
Fork 1
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libp7/src/protocol/legacy/special.c.draft

42 lines
1.3 KiB
Plaintext

/* *****************************************************************************
* legacy/special.c -- send special legacy packets.
* Copyright (C) 2016-2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
*
* This file is part of libp7.
* libp7 is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3.0 of the License,
* or (at your option) any later version.
*
* libp7 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libp7; if not, see <http://www.gnu.org/licenses/>.
* ************************************************************************** */
#include <libp7/internals.h>
/**
* p7_legacy_send_ack:
* Send a legacy ack.
*
* @arg handle the handle.
* @return the error (if one).
*/
int p7_legacy_send_ack(p7_handle_t *handle)
{
char byte = 0x06;
int err = p7_write(handle->stream, &byte, 1, 0);
return (err ? err : p7_recv(handle->stream));
}
/**
* p7_legacy_send_end:
* Send the end packet.
*
* @arg
*/