Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
server.cpp | 2022-11-13 | 5.2 kB | |
AppServer.cpp | 2022-11-13 | 7.1 kB | |
Eventloop.cpp | 2022-11-13 | 17.1 kB | |
Eventloop.h | 2022-11-13 | 3.9 kB | |
InputListener.h | 2022-11-13 | 1.5 kB | |
TcpClient.h | 2022-11-13 | 2.5 kB | |
TcpSegment.cpp | 2022-11-13 | 14.0 kB | |
AppClient.h | 2022-11-13 | 3.5 kB | |
README.txt | 2022-11-13 | 1.8 kB | |
TcpConnection.h | 2022-11-13 | 6.3 kB | |
TcpConnection.sm | 2022-11-13 | 21.9 kB | |
TcpConnectionListener.h | 2022-11-13 | 2.1 kB | |
TcpConnection.cpp | 2022-11-13 | 38.9 kB | |
TcpSegment.h | 2022-11-13 | 3.7 kB | |
TcpServer.cpp | 2022-11-13 | 2.3 kB | |
winsock_strerror.cpp | 2022-11-13 | 4.8 kB | |
AppServer.h | 2022-11-13 | 3.4 kB | |
client.cpp | 2022-11-13 | 7.0 kB | |
Makefile | 2022-11-13 | 3.5 kB | |
TcpClient.cpp | 2022-11-13 | 4.2 kB | |
TcpServer.h | 2022-11-13 | 1.7 kB | |
TimerListener.h | 2022-11-13 | 1.5 kB | |
AppClient.cpp | 2022-11-13 | 9.7 kB | |
Totals: 23 Items | 167.6 kB | 0 |
C++ Example 6 An incomplete implementation of the TCP state machine. This implementation is based on UDP sockets and does the TCP connect and disconnect processing. This demo does *not* implement TCP's sophisticated transmission capability. + Building ---------- NOTE: Smc.jar must be built and installed. $ make all + 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: 1. Open a new shell window. 2. $ cd .../src/examples/C++/EX6 3. $ server <port #> 4. Open a new shell window. 5. $ cd .../src/examples/C++/EX6 6. $ client <hostname> <port #> where <hostname> is the computer on which the server is running. Windows: 1. Open a new DOS command window. 2. C:\> cd ...\src\examples\C++\EX6\Debug\server 3. C:\...\src\examples\C++\EX6> server <port #> 4. Open a new DOS command window. 5. C:\> cd ...\src\examples\C++\EX6\Debug\client 6. C:\...\src\examples\C++\EX6> client <hostname> <port #> where <hostname> is the computer on which the server is running. For both Unix and Windows, you can stop both the server and client programs by hitting <Cntl-c>. Note: On Windows, the server and client programs will not receive the interrupt until select() returns. Have some fun! Mix and match server and clients running on different computers of different platform types, even different programming languages. The server and client executables built here should run against ../../Java/EX6 server and client classes.