SPMA080 April 2021 TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD
The enet_tcpecho_client_tirtos example demonstrates a client application that first connects to the server with a greetings message “Hello from TM4C1294XL Connected LaunchPad\n” and then echoes back whatever it receives from the server.
As illustrated in the BSD socket flowchart for TCP in Figure 1-3, the client will use connect() to connect to the specified server address and port. Once the connection is established, the client will use recv() for receiving data from the server and then echo the data back.
Another difference between the client and the server in the flowchart is that the client does not need to call bind(). Binding is normally not needed on the client side for TCP. There may be circumstances where binding the client is needed in which you will use bind() to bind the client. An example would be that a firewall on the client that only allows outgoing connections on a certain port.