echo_server.c File Reference

Echo server. More...

#include "core/net.h"
#include "echo/echo_server.h"
#include "echo/echo_server_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   ECHO_TRACE_LEVEL
 

Functions

void echoServerGetDefaultSettings (EchoServerSettings *settings)
 Initialize settings with default values. More...
 
error_t echoServerInit (EchoServerContext *context, const EchoServerSettings *settings)
 Initialize Echo server context. More...
 
error_t echoServerStart (EchoServerContext *context)
 Start Echo server. More...
 
error_t echoServerStop (EchoServerContext *context)
 Stop Echo server. More...
 
void echoServerTask (EchoServerContext *context)
 Echo server task. More...
 
void echoServerDeinit (EchoServerContext *context)
 Release Echo server context. More...
 

Detailed Description

Echo server.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 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.

Description

The Echo service simply sends back to the originating source any data it receives. Refer to RFC 862 for complete details

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

Definition in file echo_server.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   ECHO_TRACE_LEVEL

Definition at line 37 of file echo_server.c.

Function Documentation

◆ echoServerDeinit()

void echoServerDeinit ( EchoServerContext context)

Release Echo server context.

Parameters
[in]contextPointer to the Echo server context

Definition at line 453 of file echo_server.c.

◆ echoServerGetDefaultSettings()

void echoServerGetDefaultSettings ( EchoServerSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains Echo server settings

Definition at line 54 of file echo_server.c.

◆ echoServerInit()

error_t echoServerInit ( EchoServerContext context,
const EchoServerSettings settings 
)

Initialize Echo server context.

Parameters
[in]contextPointer to the Echo server context
[in]settingsEcho server specific settings
Returns
Error code

Definition at line 76 of file echo_server.c.

◆ echoServerStart()

error_t echoServerStart ( EchoServerContext context)

Start Echo server.

Parameters
[in]contextPointer to the Echo server context
Returns
Error code

Definition at line 126 of file echo_server.c.

◆ echoServerStop()

error_t echoServerStop ( EchoServerContext context)

Stop Echo server.

Parameters
[in]contextPointer to the Echo server context
Returns
Error code

Definition at line 263 of file echo_server.c.

◆ echoServerTask()

void echoServerTask ( EchoServerContext context)

Echo server task.

Parameters
[in]contextPointer to the Echo server context

Definition at line 320 of file echo_server.c.