<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>client server | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/client-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Fri, 30 Apr 2010 05:49:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>java program for Client-Server Program using TCP/IP</title>
		<link>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-for-client-server-program-using-tcpip/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-for-client-server-program-using-tcpip/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 30 Apr 2010 05:47:45 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[client server]]></category>
		<category><![CDATA[tcep ip]]></category>
		<guid isPermaLink="false">http://studentprojects.in/source-codes/software-programs/java/advanced-programs/java-program-for-client-server-program-using-tcpip/</guid>

					<description><![CDATA[<p>Program : Client-Server Program using TCP/IP By : Kapil Lohia Program 1: import java.net.*; import java.io.*; class tcpip_server { public static void main(String args[]) throws IOException { ServerSocket n1=null; try { n1=new ServerSocket(98); } catch(IOException e) { System.err.println("Port 98 could not be found"); System.exit(1); } Socket c=null; try { c=n1.accept(); System.out.println("Connection from "+c); } catch(IOException</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/advanced/java-program-for-client-server-program-using-tcpip/">java program for Client-Server Program using TCP/IP</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Program : Client-Server Program using TCP/IP<br />
By : Kapil Lohia </p>
<p><strong>Program 1:</strong></p>
<pre lang="java">

import java.net.*;
import java.io.*;

class tcpip_server
{
	public static void main(String args[]) throws IOException
	{
		ServerSocket n1=null;
		try
		{
			n1=new ServerSocket(98);
		}
		catch(IOException e)
		{
			System.err.println("Port 98 could not be found");
			System.exit(1);
		}
		Socket c=null;
		try
		{
			c=n1.accept();
			System.out.println("Connection from "+c);
		}
		catch(IOException e)
		{
			System.out.println("Accept failed");
			System.exit(1);
		}
		PrintWriter out=new PrintWriter(c.getOutputStream(),true);
		BufferedReader in=new BufferedReader(new InputStreamReader(c.getInputStream()));
		String n;
		BufferedReader sin=new BufferedReader(new InputStreamReader(System.in));
		System.out.println("Ready to type now");
		while((n=sin.readLine())!=null)
		{
			out.println(n);
		}
		out.close();
		c.close();
		n1.close();
	}
}
</pre>
<p><strong>Program 2</strong></p>
<pre lang="java">

import java.net.*;
import java.io.*;

class tcpip_client
{
	public static void main(String args[]) throws IOException
	{
		Socket s=null;
		BufferedReader b=null;

		try
		{
			s=new Socket(InetAddress.getLocalHost(),98);
			b=new BufferedReader(new InputStreamReader(s.getInputStream()));
		}

		catch(UnknownHostException u)
		{
			System.err.println("I don't know host");
			System.exit(0);
		}
		String inp;
		while((inp=b.readLine())!=null)
		{
			System.out.println(inp);
		}
		b.close();
		s.close();
	}
}
</pre><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/advanced/java-program-for-client-server-program-using-tcpip/">java program for Client-Server Program using TCP/IP</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/advanced/java-program-for-client-server-program-using-tcpip/feed/</wfw:commentRss>
			<slash:comments>41</slash:comments>
		
		
			</item>
	</channel>
</rss>
