echo.h File Reference

Echo protocol. More...

#include "core/net.h"
#include "core/socket.h"

Go to the source code of this file.

Data Structures

struct  EchoServiceContext
 Echo service context. More...
 

Macros

#define ECHO_SERVICE_STACK_SIZE   600
 
#define ECHO_SERVICE_PRIORITY   OS_TASK_PRIORITY_NORMAL
 
#define ECHO_BUFFER_SIZE   1500
 
#define ECHO_TIMEOUT   20000
 
#define ECHO_PORT   7
 

Functions

error_t tcpEchoStart (void)
 Start TCP echo service. More...
 
void tcpEchoListenerTask (void *param)
 Task handling connection requests. More...
 
void tcpEchoConnectionTask (void *param)
 TCP echo service implementation. More...
 
error_t udpEchoStart (void)
 Start UDP echo service. More...
 
void udpEchoTask (void *param)
 UDP echo service implementation. More...
 

Detailed Description

Echo protocol.

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file echo.h.

Macro Definition Documentation

◆ ECHO_BUFFER_SIZE

#define ECHO_BUFFER_SIZE   1500

Definition at line 50 of file echo.h.

◆ ECHO_PORT

#define ECHO_PORT   7

Definition at line 63 of file echo.h.

◆ ECHO_SERVICE_PRIORITY

#define ECHO_SERVICE_PRIORITY   OS_TASK_PRIORITY_NORMAL

Definition at line 45 of file echo.h.

◆ ECHO_SERVICE_STACK_SIZE

#define ECHO_SERVICE_STACK_SIZE   600

Definition at line 38 of file echo.h.

◆ ECHO_TIMEOUT

#define ECHO_TIMEOUT   20000

Definition at line 57 of file echo.h.

Function Documentation

◆ tcpEchoConnectionTask()

void tcpEchoConnectionTask ( void *  param)

TCP echo service implementation.

Parameters
[in]paramPointer to the echo service context

Definition at line 193 of file echo.c.

◆ tcpEchoListenerTask()

void tcpEchoListenerTask ( void *  param)

Task handling connection requests.

Parameters
[in]paramPointer to the echo service context

Definition at line 119 of file echo.c.

◆ tcpEchoStart()

error_t tcpEchoStart ( void  )

Start TCP echo service.

Returns
Error code

Definition at line 57 of file echo.c.

◆ udpEchoStart()

error_t udpEchoStart ( void  )

Start UDP echo service.

Returns
Error code

Definition at line 325 of file echo.c.

◆ udpEchoTask()

void udpEchoTask ( void *  param)

UDP echo service implementation.

Parameters
[in]paramPointer to the echo service context

Definition at line 403 of file echo.c.