O'Reilly logo

The Sockets Networking API: UNIX® Network Programming Volume 1, Third Edition by Andrew M. Rudoff, Bill Fenner, W. Richard Stevens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. SCTP Client/Server Example

Introduction

We will now use some of the elementary functions from Chapters 4 and Chapter 9 to write a complete one-to-many SCTP client/server example. Our simple example is similar to the echo server presented in Chapter 5, and performs the following steps:

  1. A client reads a line of text from standard input and sends the line to the server. The line follows the form [#] text, where the number in brackets is the SCTP stream number on which the text message should be sent.

  2. The server receives the text message from the network, increases the stream number on which the message arrived by one, and sends the text message back to the client on this new stream number.

  3. The client reads the echoed line and prints it on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required