<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A Simple Java TCP Server and TCP Client</title>
	<atom:link href="http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:12:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Wander</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41876</link>
		<dc:creator>Wander</dc:creator>
		<pubDate>Tue, 19 Jul 2011 09:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41876</guid>
		<description>Yep. But why do u use main function twice and there are no Threads?</description>
		<content:encoded><![CDATA[<p>Yep. But why do u use main function twice and there are no Threads?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lefteris</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41860</link>
		<dc:creator>Lefteris</dc:creator>
		<pubDate>Wed, 29 Jun 2011 02:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41860</guid>
		<description>try moving the while loop just before the message = infromserver.readline().

your current code creates thousands of inputStreanReaders and bufferReaders.
also make sure when sending you end your strings with n since you are using the readline method.
if it still isn&#039;t fixed try after sending calling the .flush() mehod on the dataoutputstream (if such method exists not sure)</description>
		<content:encoded><![CDATA[<p>try moving the while loop just before the message = infromserver.readline().</p>
<p>your current code creates thousands of inputStreanReaders and bufferReaders.<br />
also make sure when sending you end your strings with n since you are using the readline method.<br />
if it still isn&#8217;t fixed try after sending calling the .flush() mehod on the dataoutputstream (if such method exists not sure)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noor Nust</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41843</link>
		<dc:creator>Noor Nust</dc:creator>
		<pubDate>Thu, 19 May 2011 03:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41843</guid>
		<description> in this code there are two classes in which it has two main. so how i write this code...
</description>
		<content:encoded><![CDATA[<p> in this code there are two classes in which it has two main. so how i write this code&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koueik Anthony</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41835</link>
		<dc:creator>Koueik Anthony</dc:creator>
		<pubDate>Fri, 06 May 2011 07:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41835</guid>
		<description>hi i am new in Java and android...my app is not working , i can connect and send data to the server( PC .net server) 

the server send me &quot; 3 string&quot;

through your code ... i wrote this solution but it is not working :

while(true){

                  try {

                      BufferedReader inFromServer = new BufferedReader(new InputStreamReader(sock.getInputStream()));

                      message = inFromServer.readLine();

                      Toast.makeText(client.this, message,Toast.LENGTH_LONG).show();


                    } catch (IOException e) {

                        // TODO Auto-generated catch block

                        Toast.makeText(client.this, &quot;not working&quot;,Toast.LENGTH_LONG).show();

                        e.printStackTrace();

                    }

                

            }


can you tell me what&#039;s wrong... Please

</description>
		<content:encoded><![CDATA[<p>hi i am new in Java and android&#8230;my app is not working , i can connect and send data to the server( PC .net server) </p>
<p>the server send me &#8221; 3 string&#8221;</p>
<p>through your code &#8230; i wrote this solution but it is not working :</p>
<p>while(true){</p>
<p>                  try {</p>
<p>                      BufferedReader inFromServer = new BufferedReader(new InputStreamReader(sock.getInputStream()));</p>
<p>                      message = inFromServer.readLine();</p>
<p>                      Toast.makeText(client.this, message,Toast.LENGTH_LONG).show();</p>
<p>                    } catch (IOException e) {</p>
<p>                        // TODO Auto-generated catch block</p>
<p>                        Toast.makeText(client.this, &#8220;not working&#8221;,Toast.LENGTH_LONG).show();</p>
<p>                        e.printStackTrace();</p>
<p>                    }</p>
<p>            }</p>
<p>can you tell me what&#8217;s wrong&#8230; Please</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rad</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41830</link>
		<dc:creator>Rad</dc:creator>
		<pubDate>Sun, 10 Apr 2011 10:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41830</guid>
		<description>the out put is whatever you type into the client via this line in the code:

sentence = inFromUser.readLine();
  outToServer.writeBytes(sentence + &#039;n&#039;);</description>
		<content:encoded><![CDATA[<p>the out put is whatever you type into the client via this line in the code:</p>
<p>sentence = inFromUser.readLine();<br />
  outToServer.writeBytes(sentence + &#8216;n&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rad</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41829</link>
		<dc:creator>Rad</dc:creator>
		<pubDate>Sun, 10 Apr 2011 10:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41829</guid>
		<description>hi, if you run the client, then type something like &quot;hello world&quot; and then press enter, the server and the client will respond (only obvious if you read the code)</description>
		<content:encoded><![CDATA[<p>hi, if you run the client, then type something like &#8220;hello world&#8221; and then press enter, the server and the client will respond (only obvious if you read the code)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aredline</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41813</link>
		<dc:creator>aredline</dc:creator>
		<pubDate>Thu, 10 Mar 2011 05:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41813</guid>
		<description>Best simple code!

@Bhanusankar Bsc
The input string in uppercase:
            System.out.println(&quot;Received: &quot; + clientSentence);
            capitalizedSentence = clientSentence.toUpperCase() + &#039;n&#039;;
            outToClient.writeBytes(capitalizedSentence);//response to the client</description>
		<content:encoded><![CDATA[<p>Best simple code!</p>
<p>@Bhanusankar Bsc<br />
The input string in uppercase:<br />
            System.out.println(&#8220;Received: &#8221; + clientSentence);<br />
            capitalizedSentence = clientSentence.toUpperCase() + &#8216;n&#8217;;<br />
            outToClient.writeBytes(capitalizedSentence);//response to the client</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhanusankar Bsc</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41808</link>
		<dc:creator>Bhanusankar Bsc</dc:creator>
		<pubDate>Tue, 08 Mar 2011 09:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41808</guid>
		<description>what is the exact output for this program...</description>
		<content:encoded><![CDATA[<p>what is the exact output for this program&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zohaib</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41798</link>
		<dc:creator>Zohaib</dc:creator>
		<pubDate>Fri, 25 Feb 2011 05:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41798</guid>
		<description>i am using this code but this code released error (connection reset)</description>
		<content:encoded><![CDATA[<p>i am using this code but this code released error (connection reset)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sirbi Kotrappa</title>
		<link>http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/comment-page-1/#comment-41790</link>
		<dc:creator>Sirbi Kotrappa</dc:creator>
		<pubDate>Thu, 27 Jan 2011 23:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://systembash.com/?p=244#comment-41790</guid>
		<description>please some body suggest me, how to develop simple simulated Java client-server for File Exchange</description>
		<content:encoded><![CDATA[<p>please some body suggest me, how to develop simple simulated Java client-server for File Exchange</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic

Served from: systembash.com @ 2012-02-09 01:49:33 -->
