|
DataServer is started, in the directory above the DataMonitor subdirectory where it is located, with the command: c:\> java DataMonitor.DataServer Below we see both the DOS window where the server is run and the Frame holding the FallingObject applet.
Note that unlike previous server examples, the port number is not an argument. Instead, port 1111 is coded into the program. In the other lines in the DOS window, we see that the server waits and then a client connects. Using the toString() method for the socket that was created for this client, a print shows the socket host and the remote and local port information. The server creats a DataReader that sends data from the physics simulator to the client. We see here that some data was generated and a client has three times requested the data before disconnecting.
|
||||||||||||
|
|||||||||||||