import java.net.*;
import java.io.*;
public class Date Server
{
public static void main(String[] args) {
try {
Server Socket sock = new Server Socket(6013);/* now listen for connections */
while (true) {
Socket client = sock. Accept();
Print Writer pout = new
Print Writer(client. get Output Stream(), true);
/* write the Date to the socket */
pout. Print ln(new java. util. Date().to String());/* close the socket and resume */
/* listening for connections */
client. close();}}
catch (IO Exception ioe) {
System. Err .print ln(ioe);
}}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here