0
2.7kviews
Write a program for client-server application using Socket Programming(TCP)

Mumbai University > Computer Engineering > Sem 5 > Computer Networks

Marks: 10 Marks

Year: May 2016

1 Answer
0
16views

Socket Client Example:

The following Greeting Client is a client program that connects to a server by using a socket and sends a greeting, and then waits for a response.

// File Name GreetingClient.java
import java.net.*;
import java.io.*;
publicclassGreetingClient
{
publicstaticvoid main(String[]args)
{
StringserverName=args[0];
int port =Integer.parseInt(args[1]);
try
{
System.out.println("Connecting …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.