Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
SCTP Programmer's Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 3 Compiling and Running Applications that Use the SCTP Socket APIs

Running Sample Applications that use the SCTP APIs

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

This section discusses how to run the sample applications that are compiled using the SCTP APIs.

Consider the sample server and client applications listed in Appendix A for one-to-one and one-to-many connections. These sample applications are available in the /usr/lib/demos/networking/sctp directory.

To run the sample server application, enter the following command:

# ./srv_app <port_number>

where:

srv_app

Specifies the executable file.

port_number

Specifies the port number on which the server accepts connections.

Example 3-2 Sample Command to Run the Server Application

To run the sample server application in a one-to-one or one-to-many connection, enter the following command:

# ./srv_app 6000

The following output is displayed:

{one-to-one}: Waiting for associations ...

This output denotes that the server is ready to accept connections on port 6000.

To run the sample client application , enter the following command:

#./cli_app <ip_address> <port_number>

where:

cli_app

Specifies the executable file.

ip_address

Specifies the IP address of the server to which the client wants to connect.

port_number

Specifies the port number on which the server accepts connections.

NOTE: Before running the server and client applications, ensure that sctpd is running on the system that contains the server and client applications.

To check whether sctpd is running on the system, enter the following command:

# ps –ef | grep sctpd

The following output is displayed if sctpd is running:

root 6854 25317 1 18:36:25 pts/tc 0:00 grep scptd

Example 3-3 Sample Command to Run the Client Application

To run the sample client application in a one-to-one or one-to-many connection, enter the following command:

#./cli_app 15.70.189.135 6000

The following output is displayed:

Connected to [15.70.189.135]
<S>:

This output denotes that the client has established an association with the server on the port 6000.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007–2008 Hewlett-Packard Development Company, L.P.