7 Nov '14

Anupa Manipal

A professional Software Developer in VB.NET - SQL Server and learner of PHP. Expertise in implementation of various projects including designing, development, coding and implementation of software applications.

0 Shares

TCP PROGRAM -Date and Time client server

TCP PROGRAM(Date and Time client server)

AIM

To create date and time client server using the TCP protocol

ALGORITHM

Server

  • Declare the necessary arrays and variables.
  • Set server port address using socket().
  • Get the current message.
  • Connect to the client.
  • Stop the process.

Client

  • Set the client machine address.
  • Connect to the server.
  • Read from the server the current message.
  • Display the current message.
  • Close the connection.

PROGRAM

DateClient:

OUTPUT:

DateClient:

C:\Program Files\Java\jdk1.6.0\bin>javac dateclient.java

C:\Program Files\Java\jdk1.6.0\bin>java dateclient

THE date in the server is:Sat Jul 19 13:01:16 GMT+05:30 2008

C:\Program Files\Java\jdk1.6.0\bin>

DateServer:

C:\Program Files\Java\jdk1.6.0\bin>javac dateserver.java

C:\Program Files\Java\jdk1.6.0\bin>java dateserver

THE CLIENT SYSTEM ADDRESS IS :com17/192.168.21.17

RESULT: Thus the output has been executed and verified successfully for date and time client server

About Anupa Manipal

A professional Software Developer in VB.NET - SQL Server and learner of PHP. Expertise in implementation of various projects including designing, development, coding and implementation of software applications.

Related Posts

Leave a Reply