<?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: How to Code a Server and Client in C  with Sockets on Linux &#8211; Code Examples	</title>
	<atom:link href="https://www.binarytides.com/server-client-example-c-sockets-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/server-client-example-c-sockets-linux/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Sat, 16 Apr 2022 08:30:38 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Zamer Chaudhary		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-335295</link>

		<dc:creator><![CDATA[Zamer Chaudhary]]></dc:creator>
		<pubDate>Sat, 16 Apr 2022 08:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-335295</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-251773&quot;&gt;Silver Moon&lt;/a&gt;.

Hey sir i need you help related to Develop a client/server application using Linux TCP sockets and the C programming language. 
I will share the more information on mail. Please respond me.
aaliyahnza@gmail.com]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-251773">Silver Moon</a>.</p>
<p>Hey sir i need you help related to Develop a client/server application using Linux TCP sockets and the C programming language.<br />
I will share the more information on mail. Please respond me.<br />
<a href="mailto:aaliyahnza@gmail.com">aaliyahnza@gmail.com</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Resolved: How to host a website in my network (localhost) using Java [closed] - Daily Developer Blog		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-334987</link>

		<dc:creator><![CDATA[Resolved: How to host a website in my network (localhost) using Java [closed] - Daily Developer Blog]]></dc:creator>
		<pubDate>Mon, 11 Apr 2022 08:15:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-334987</guid>

					<description><![CDATA[[&#8230;] always the same method in Java or C, I invite you to look at this tutorial to do it in C: https://www.binarytides.com/server-client-example-c-sockets-linux/ You can also read this: https://docs.oracle.com/cd/E21764_01/core.1111/e10103/intro.htm#ASCON112 If [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] always the same method in Java or C, I invite you to look at this tutorial to do it in C: <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/" rel="ugc">https://www.binarytides.com/server-client-example-c-sockets-linux/</a> You can also read this: <a href="https://docs.oracle.com/cd/E21764_01/core.1111/e10103/intro.htm#ASCON112" rel="nofollow ugc">https://docs.oracle.com/cd/E21764_01/core.1111/e10103/intro.htm#ASCON112</a> If [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mehmet		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-328940</link>

		<dc:creator><![CDATA[Mehmet]]></dc:creator>
		<pubDate>Tue, 07 Dec 2021 12:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-328940</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-59971&quot;&gt;Monica&lt;/a&gt;.

look at the signals that may help you.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-59971">Monica</a>.</p>
<p>look at the signals that may help you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-327055</link>

		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 04 Nov 2021 20:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-327055</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-116161&quot;&gt;proxy998inchains&lt;/a&gt;.

I&#039;m wondering that, too. As soon as I change from the localhost address, I start getting message refused on the client.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-116161">proxy998inchains</a>.</p>
<p>I&#8217;m wondering that, too. As soon as I change from the localhost address, I start getting message refused on the client.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: yashar amirabadii		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-317489</link>

		<dc:creator><![CDATA[yashar amirabadii]]></dc:creator>
		<pubDate>Tue, 11 May 2021 11:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-317489</guid>

					<description><![CDATA[hii, how to run it and send data 
plz help me!]]></description>
			<content:encoded><![CDATA[<p>hii, how to run it and send data<br />
plz help me!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Beau Carlson		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-316393</link>

		<dc:creator><![CDATA[Beau Carlson]]></dc:creator>
		<pubDate>Sat, 17 Apr 2021 18:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-316393</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-120571&quot;&gt;Alex&lt;/a&gt;.

Were you able to? I have a project coming up that this could be very useful for]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-120571">Alex</a>.</p>
<p>Were you able to? I have a project coming up that this could be very useful for</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-271858</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 11 Aug 2020 07:01:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-271858</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-265816&quot;&gt;Minor&lt;/a&gt;.

thanks for sharing.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-265816">Minor</a>.</p>
<p>thanks for sharing.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Minor		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-265816</link>

		<dc:creator><![CDATA[Minor]]></dc:creator>
		<pubDate>Fri, 17 Jul 2020 05:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-265816</guid>

					<description><![CDATA[If any one looking for mac os sample like me, this will help you.
https://razibdeb.blogspot.com/2020/07/simple-bsd-socket-server-client-example.html]]></description>
			<content:encoded><![CDATA[<p>If any one looking for mac os sample like me, this will help you.<br />
<a href="https://razibdeb.blogspot.com/2020/07/simple-bsd-socket-server-client-example.html" rel="nofollow ugc">https://razibdeb.blogspot.com/2020/07/simple-bsd-socket-server-client-example.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-251773</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Sun, 17 May 2020 11:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-251773</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-144114&quot;&gt;jknjk&lt;/a&gt;.

fixed it. try to compile the code now. 
it should work.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-144114">jknjk</a>.</p>
<p>fixed it. try to compile the code now.<br />
it should work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Henry		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-207878</link>

		<dc:creator><![CDATA[Henry]]></dc:creator>
		<pubDate>Sat, 07 Sep 2019 23:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-207878</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-139869&quot;&gt;Bruno&lt;/a&gt;.

And whats the real good code?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-139869">Bruno</a>.</p>
<p>And whats the real good code?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jknjk		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-144114</link>

		<dc:creator><![CDATA[jknjk]]></dc:creator>
		<pubDate>Wed, 29 Nov 2017 13:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-144114</guid>

					<description><![CDATA[The multiple client server is all messed up and doesn&#039;t even work properly, trash and useless. If you&#039;re posting something to help, at least post it right.]]></description>
			<content:encoded><![CDATA[<p>The multiple client server is all messed up and doesn&#8217;t even work properly, trash and useless. If you&#8217;re posting something to help, at least post it right.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bruno		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-139869</link>

		<dc:creator><![CDATA[Bruno]]></dc:creator>
		<pubDate>Thu, 09 Nov 2017 10:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-139869</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-66010&quot;&gt;ChrisX&lt;/a&gt;.

Not if you understand what the code does and how to correct the mistakes in it, it hangs after a while due to zombie threads and not closing the file descriptor after use!

A lot of people just copy an paste without actually understanding what each line does, there is no wonder it doesn&#039;t work for people who do this!  How many times have you found code on the web that work out of the box without having to modify it?  For me, never!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-66010">ChrisX</a>.</p>
<p>Not if you understand what the code does and how to correct the mistakes in it, it hangs after a while due to zombie threads and not closing the file descriptor after use!</p>
<p>A lot of people just copy an paste without actually understanding what each line does, there is no wonder it doesn&#8217;t work for people who do this!  How many times have you found code on the web that work out of the box without having to modify it?  For me, never!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: bit-pressure		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-124779</link>

		<dc:creator><![CDATA[bit-pressure]]></dc:creator>
		<pubDate>Mon, 24 Jul 2017 20:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-124779</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-99413&quot;&gt;Artem&lt;/a&gt;.

You have to include this: #include ]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-99413">Artem</a>.</p>
<p>You have to include this: #include </p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adithiya		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-122557</link>

		<dc:creator><![CDATA[Adithiya]]></dc:creator>
		<pubDate>Thu, 29 Jun 2017 05:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-122557</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-99413&quot;&gt;Artem&lt;/a&gt;.

Just add the header file in the program &quot;#include&quot;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-99413">Artem</a>.</p>
<p>Just add the header file in the program &#8220;#include&#8221;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-120571</link>

		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 08 Jun 2017 10:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-120571</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-117245&quot;&gt;Tim&lt;/a&gt;.

Yes, it fixes the bug with memory leakage but disables the multiple clients functionality, so this example doesn&#039;t really work :( I cann&#039;t solve this problem yet.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-117245">Tim</a>.</p>
<p>Yes, it fixes the bug with memory leakage but disables the multiple clients functionality, so this example doesn&#8217;t really work :( I cann&#8217;t solve this problem yet.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tim		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-117245</link>

		<dc:creator><![CDATA[Tim]]></dc:creator>
		<pubDate>Sun, 07 May 2017 15:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-117245</guid>

					<description><![CDATA[I found two problem with the threaded server code:

1. The file descriptor is never closed when the thread is freed.  After a while this eats up all of the file descriptors in the operating system.  To fix this, add close(sock); just before free(sock_desc), like so:
    //Free the socket pointer
    close(sock)
    free(socket_desc);
    return 0;

2. There is a memory leak that can be fixed by uncommenting   //pthread_join( sniffer_thread , NULL);

When these two issues are corrected it works perfectly for me.]]></description>
			<content:encoded><![CDATA[<p>I found two problem with the threaded server code:</p>
<p>1. The file descriptor is never closed when the thread is freed.  After a while this eats up all of the file descriptors in the operating system.  To fix this, add close(sock); just before free(sock_desc), like so:<br />
    //Free the socket pointer<br />
    close(sock)<br />
    free(socket_desc);<br />
    return 0;</p>
<p>2. There is a memory leak that can be fixed by uncommenting   //pthread_join( sniffer_thread , NULL);</p>
<p>When these two issues are corrected it works perfectly for me.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: proxy998inchains		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-116161</link>

		<dc:creator><![CDATA[proxy998inchains]]></dc:creator>
		<pubDate>Thu, 27 Apr 2017 10:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-116161</guid>

					<description><![CDATA[why do i get i connection error.....should i change port or there is another solution.....]]></description>
			<content:encoded><![CDATA[<p>why do i get i connection error&#8230;..should i change port or there is another solution&#8230;..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Artem		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-99413</link>

		<dc:creator><![CDATA[Artem]]></dc:creator>
		<pubDate>Wed, 30 Nov 2016 16:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-99413</guid>

					<description><![CDATA[Hello. I cannot compile client example. Got that message: client.c:60:5: warning: implict declaration of function &#039;close&#039; (-Wimplict-function-declaration) close(sock);]]></description>
			<content:encoded><![CDATA[<p>Hello. I cannot compile client example. Got that message: client.c:60:5: warning: implict declaration of function &#8216;close&#8217; (-Wimplict-function-declaration) close(sock);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: saqib		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-95456</link>

		<dc:creator><![CDATA[saqib]]></dc:creator>
		<pubDate>Thu, 06 Oct 2016 17:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-95456</guid>

					<description><![CDATA[what should i do to make the client ask for only one message and server prints it completely but just once. i am using single client code.]]></description>
			<content:encoded><![CDATA[<p>what should i do to make the client ask for only one message and server prints it completely but just once. i am using single client code.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: saqib		</title>
		<link>https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-95455</link>

		<dc:creator><![CDATA[saqib]]></dc:creator>
		<pubDate>Thu, 06 Oct 2016 17:37:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2306#comment-95455</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-67549&quot;&gt;Pranav&lt;/a&gt;.

pranav i used the single client code but had the same problem. so what you can do in every code of server and client after printing initialize the char array to null. worked for me.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/server-client-example-c-sockets-linux/comment-page-1/#comment-67549">Pranav</a>.</p>
<p>pranav i used the single client code but had the same problem. so what you can do in every code of server and client after printing initialize the char array to null. worked for me.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
