Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
TcpServer.java | 2021-01-01 | 1.7 kB | |
TcpServerListener.java | 2021-01-01 | 1.4 kB | |
TimerListener.java | 2021-01-01 | 1.2 kB | |
TcpConnection.java | 2021-01-01 | 25.3 kB | |
TcpConnection.sm | 2021-01-01 | 20.3 kB | |
TcpConnectionListener.java | 2021-01-01 | 1.7 kB | |
TcpSegment.java | 2021-01-01 | 9.8 kB | |
server.java | 2021-01-01 | 9.2 kB | |
TcpClient.java | 2021-01-01 | 2.5 kB | |
TcpClientListener.java | 2021-01-01 | 1.5 kB | |
DatagramSocketListener.java | 2021-01-01 | 1.6 kB | |
Makefile | 2021-01-01 | 8.4 kB | |
Makefile.unix | 2021-01-01 | 3.4 kB | |
Makefile.win | 2021-01-01 | 3.4 kB | |
README.txt | 2021-01-01 | 1.3 kB | |
server_manifest.txt | 2021-01-01 | 52 Bytes | |
AsyncDatagramSocket.java | 2021-01-01 | 6.8 kB | |
AsyncTimer.java | 2021-01-01 | 7.7 kB | |
client.java | 2021-01-01 | 11.8 kB | |
client_manifest.txt | 2021-01-01 | 52 Bytes | |
Totals: 20 Items | 119.1 kB | 0 |
Java Example 6 The TCP/IP protocol state diagram based on UDP. It follows the TCP/IP connect and disconnect protocol but not the sophisticated transmission scheme. + Building ---------- NOTE: Smc.jar must be built and installed. Unix & Windows: $ make tcpdemo + Executing ----------- There are two separate applications: server and client. The server application accepts connections on a specified port. The client application connections to the server application and transmits messages at random times. The accepted client connection also sends messages. Unix & Windows: $ java -jar server.jar <port> where <port> is a valid *UDP* port number. Hit return to terminate the application. This will close all client connections and all clients will terminate. $ java -jar client.ajr [-h <host>] -p <port> where <host> is the host machine running the server application (may be omitted if client is running on the same machine). <port> is the same port number used in starting the server application. Hit return to terminate the application. This will close this client's connection to the server. The server will *not* terminate.