In this chapter, it describes about the function of Socket Simulator's initial view (the "Top View").
In this view, creates and deletes a socket. And, polls, lists sockets.
[Note]
No upper limit on the number of sockets that can be created.
| Icon | Description | |
|---|---|---|
| Role | ![]() | Server socket Socket is waiting a connection request with calling listen(2). Or, socket was created with accept(2). |
![]() | Client socket Other than those above. | |
| I/O mode (*1) | ![]() | Non-blocking mode The file status flag of socket was set to O_NONBLOCK with fcntl(2). |
![]() | Blocking mode Other than those above. | |
| Connection status (*2) | ![]() | Not connected Status is Idle. Or, the socket is bound status with calling bind(2). |
![]() | Listening Waiting for connection request with calling listen(2). | |
![]() | Connect in progress Waiting for completion of connection for the non-blocking socket. | |
![]() | Connect error Error occurred in connection for the socket. | |
![]() | Connected (in full duplex) Completion connect for the socket. Or, the socket was created with accept(2). | |
![]() | Connected Receiver side of full duplex was shut down. | |
![]() | Connected Sender side of full duplex was shut down. | |
![]() | Disconnect All of full duplex were shut down. | |
*1 When the app setting DESCRIPTION is enabled, the icon of I/O mode is displayed.
*2 When the app setting AUTO MONITORING is enabled, the icon of connection status is displayed with SOCK_STREAM socket.
In Address, the pair of IP address and port (if PF_INET), or UNIX domain path (if PF_UNIX) is displayed.
| Title | Status |
|---|---|
| INET domain socket | Initial state of AF_INET socket |
| UNIX domain socket | Initial state of AF_UNIX socket |
| Dst Address | Socket is connected. |
| Src Address | Socket is listening. Or, SOCK_DGRAM socket is assinged an address. |
| Connection status | Icon | Description |
|---|---|---|
| Idle | ![]() | Initial status. |
| Bound | An address is bound to the socket. | |
| Listening | ![]() | Waiting for connection requests. |
| Connect in progress | ![]() | Waiting for completion of connecting. |
| Connect error | ![]() | Error occurred in connecting process. The following error value is displayed as an additional information. Err#<errno number> <errno name> |
| Connected | ![]() | Socket is connected. |
![]() | ||
![]() | ||
| Disconnect | ![]() | Socket is disconnected. |
Connection status transition diagram is as below.

This state is displayed based on the values of parameter tcpi_state obtained TCP_CONNECTION_INFO option.
See RFC#793 or internet public site for details.
| tcpi_state | State |
|---|---|
| 0 | CLOSED |
| 1 | LISTEN |
| 2 | SYN_SENT |
| 3 | SYN_RECEIVED |
| 4 | ESTABLISHED |
| 5 | CLOSE_WAIT |
| 6 | FIN_WAIT_1 |
| 7 | CLOSING |
| 8 | LAST_ACK |
| 9 | FIN_WAIT_2 |
| 10 | TIME_WAIT |
The value of the following parameters obtained TCP_CONNECTION_INFO option is displayed.
| Traffic | Parameter | Description |
|---|---|---|
| RX | tcpi_rxbytes tcpi_rxpackets | Data size in incoming traffic (bytes / packets) |
| TX | tcpi_txbytes tcpi_txpackets | Data size in outgoing traffic (bytes / packets) |
| Retransmit | tcpi_txretransmitbytes tcpi_txretransmitpackets | Retransmitted data size in outging traffic (bytes / packets) |
The value of the following parameters obtained TCP_CONNECTION_INFO option is displayed.
| Round Trip | Parameter | Description |
|---|---|---|
| Average RTT | tcpi_srtt | Average time of RTT (seconds) |
| Recent RTT | tcpi_rttcur | Most recent time of RTT (seconds) |
[Note]
Three types of polling are available in this app.