From fe71239fc0d1e65e06ba9dcf2fb35239bff21466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C5=ABnas=20Ma=C5=BEeikis?= Date: Tue, 21 May 2019 20:01:08 +0300 Subject: Protocol: moved udp code out of main. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An effor was made to increase modularity of device code. It was a partial success. IP adress, communications port, and wifi login details had to be made static and visible in main. Time is scarce and I am not about to push this further. Signed-off-by: Ramūnas Mažeikis --- include/protocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/protocol.h') diff --git a/include/protocol.h b/include/protocol.h index c5e657b..8d5c535 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -116,7 +116,7 @@ struct tlv * get_tlv(cd_t cd); /** * Any modifications made to the pending outgoing packet are nullified. * */ -void clear_data(cd_t connection); +int clear_data(cd_t connection); /** * Appends data to the next packet to be sent. Type of data is determined by @@ -127,7 +127,7 @@ int push_data(cd_t connection, const char *data, enum tlv_type); /** * Sends packet towards the other end. * */ -void flush_data(cd_t connection); +int flush_data(cd_t connection); cd_t protocol_init(void); -- cgit v1.2.3