Skip to end of metadata
Go to start of metadata

This section describes the examples that are related to the TCP/IP module of Micrium OS.

TCP Echo Client

Description

This is a generic example that shows how to create a simple TCP echo client. It accomplishes the following tasks:

  • Open a socket
  • Configure socket's address
  • Connect to the server
  • Transmit data to the server
  • Receive echo response from the server
  • Close socket

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_tcp_client.c
  • /examples/net/socket/ex_net_sock.h
  • /examples/net/socket/ex_net_sock_tcp_server.py

API

APIDescription
Ex_Net_SockTCP_Client()Create a TCP Echo client

Notes

The file ex_net_sock_tcp_server.py, can be used on any PC to create the associate TCP echo server.

TCP Echo Server

Description

This is a generic example that shows how to create a simple TCP echo IPv4 or IPv6 server. It accomplishes the following tasks:

  • Open a socket
  • Configure socket's address
  • Bind the socket.
  • Receive data on the socket
  • Transmit to source the data received.
  • Close socket on fatal fault error.

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_tcp_server.c
  • /examples/net/socket/ex_net_sock.h

API

APIDescription
Ex_Net_SockTCP_ServerIPv4()Create an Echo server which accepts IPv4 connection
Ex_Net_SockTCP_ServerIPv6()Create an Echo server which accepts IPv6 connection

Notes

None

UDP Echo Client

Description

This is a generic example that shows how to create a simple UDP echo client. It accomplishes the following tasks:

  • Open a socket
  • Configure socket's address
  • Transmit data to the server
  • Receive echo response from the server
  • Close socket.

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_udp_client.c
  • /examples/net/socket/ex_net_sock.h

API

APIDescription
Ex_Net_SockUDP_Client()Create an UDP Echo client

Notes

None

UDP Echo Server

Description

This is a generic example that shows how to create a simple UDP echo IPv4 or IPv6 server. It accomplishes the following tasks:

  • Open a socket
  • Configure socket's address
  • Bind the socket.
  • Receive data on the socket
  • Transmit to source the data received.
  • Close socket on fatal fault error.

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_tcp_server.c
  • /examples/net/socket/ex_net_sock.h

API

APIDescription
Ex_Net_SockUDP_ServerIPv4()Create an Echo server which accepts IPv4 connection
Ex_Net_SockUDP_ServerIPv6()Create an Echo server which accepts IPv6 connection

Notes

None

Multicast Echo Server

Description

This is a generic example that shows how to create an UDP Multicast echo server using IPv4 address. It accomplishes the following tasks:

  • Join the multicast group
  • Open a socket
  • Configure socket's address
  • Bind the socket.
  • Receive data on the socket
  • Transmit to source the data received.
  • Close socket on fatal fault error.

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_mcast_echo_server.c
  • /examples/net/socket/ex_net_sock.h

API

APIDescription
Ex_Net_SockMCastEchoServer()Create a Multicast Echo server which accept IPv4 connection

Notes

The file ex_net_sock_mcast_echo_client.py, can be used on any PC to create the associate TCP echo client.

TCP SSL/TLS Client Connection

Description

This is a generic example that shows how to connect a client to a server over SSL/TLS. It accomplishes the following tasks:

  • Install CA certificate
  • Open a TCP socket
  • Configure socket's option to be secure
  • Configure socket's address
  • Connect; establish a secure connection with the server.

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_secure_client.c
  • /examples/net/socket/ex_net_sock.h
  • /examples/net/socket/ex_go_daddy.cer

API

APIDescription
Ex_Net_SockSecureClientConnect()Initialize a client secure socket.

Notes

None.

TCP SSL/TLS Server 

Description

This is a generic example that shows how to create a server that accept secure connection using SSL/TLS. It accomplishes the following tasks:

  • Open a TCP socket
  • Configure socket's option to be secure
  • Bind the socket
  • Listen

Configuration

None. 

Location

  • /examples/net/socket/ex_net_sock_secure_serverc
  • /examples/net/socket/ex_net_sock.h

API

APIDescription
Ex_Net_SockSecureServerInit()Initialize server's listen socket to accept connection over TLS/SSL.

Notes

None.

  • No labels