<?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 simple Tcp Socket Server in Winsock	</title>
	<atom:link href="https://www.binarytides.com/code-tcp-socket-server-winsock/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/code-tcp-socket-server-winsock/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Mon, 03 May 2021 03:40:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: John		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-316963</link>

		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Mon, 03 May 2021 03:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-316963</guid>

					<description><![CDATA[Thanks a lot
looking for this for a long time
and finally found what I exactly need here :)]]></description>
			<content:encoded><![CDATA[<p>Thanks a lot<br />
looking for this for a long time<br />
and finally found what I exactly need here :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: pixy		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-311031</link>

		<dc:creator><![CDATA[pixy]]></dc:creator>
		<pubDate>Fri, 22 Jan 2021 05:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-311031</guid>

					<description><![CDATA[It is a wonderful blog! Thank you so much!]]></description>
			<content:encoded><![CDATA[<p>It is a wonderful blog! Thank you so much!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-269224</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Fri, 31 Jul 2020 13:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-269224</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-196139&quot;&gt;Alan8&lt;/a&gt;.

sorry for the wrong characters in the code.
i have fixed it. should run fine now]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-196139">Alan8</a>.</p>
<p>sorry for the wrong characters in the code.<br />
i have fixed it. should run fine now</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sumit		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-210928</link>

		<dc:creator><![CDATA[Sumit]]></dc:creator>
		<pubDate>Sat, 28 Sep 2019 13:02:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-210928</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-196139&quot;&gt;Alan8&lt;/a&gt;.

Replace &#038; by &#038; and replace &#034; by &quot; everything will work.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-196139">Alan8</a>.</p>
<p>Replace &amp; by &amp; and replace &quot; by &#8221; everything will work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan8		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-196139</link>

		<dc:creator><![CDATA[Alan8]]></dc:creator>
		<pubDate>Tue, 07 May 2019 17:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-196139</guid>

					<description><![CDATA[Won&#039;t even compile.  &quot;amp&quot; is undefined.  the &#038;... symbols are weird.  Waste of time.]]></description>
			<content:encoded><![CDATA[<p>Won&#8217;t even compile.  &#8220;amp&#8221; is undefined.  the &amp;&#8230; symbols are weird.  Waste of time.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sudheer		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-177309</link>

		<dc:creator><![CDATA[sudheer]]></dc:creator>
		<pubDate>Fri, 01 Feb 2019 11:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-177309</guid>

					<description><![CDATA[As we already have added master to the readfds set, will it not always return 1 for the below command

        //If something happened on the master socket , then its an incoming connection
        if (FD_ISSET(master , &#038;readfds)) 
        {]]></description>
			<content:encoded><![CDATA[<p>As we already have added master to the readfds set, will it not always return 1 for the below command</p>
<p>        //If something happened on the master socket , then its an incoming connection<br />
        if (FD_ISSET(master , &amp;readfds))<br />
        {</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: chris		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-166409</link>

		<dc:creator><![CDATA[chris]]></dc:creator>
		<pubDate>Fri, 31 Aug 2018 06:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-166409</guid>

					<description><![CDATA[this code compiles with about 3000 errors, why?]]></description>
			<content:encoded><![CDATA[<p>this code compiles with about 3000 errors, why?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Santanu Maity		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-157091</link>

		<dc:creator><![CDATA[Santanu Maity]]></dc:creator>
		<pubDate>Wed, 04 Apr 2018 12:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-157091</guid>

					<description><![CDATA[Client Program Please.]]></description>
			<content:encoded><![CDATA[<p>Client Program Please.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: William		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-147691</link>

		<dc:creator><![CDATA[William]]></dc:creator>
		<pubDate>Sun, 17 Dec 2017 22:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-147691</guid>

					<description><![CDATA[By the way, there is no problem with telnet on Mac OS X sending connections to the server app running on windows.It works just fine.]]></description>
			<content:encoded><![CDATA[<p>By the way, there is no problem with telnet on Mac OS X sending connections to the server app running on windows.It works just fine.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: William		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-147690</link>

		<dc:creator><![CDATA[William]]></dc:creator>
		<pubDate>Sun, 17 Dec 2017 22:23:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-147690</guid>

					<description><![CDATA[Thanks, Saved me a great, great deal!]]></description>
			<content:encoded><![CDATA[<p>Thanks, Saved me a great, great deal!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dave B		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-121535</link>

		<dc:creator><![CDATA[Dave B]]></dc:creator>
		<pubDate>Tue, 20 Jun 2017 15:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-121535</guid>

					<description><![CDATA[Nice, very nice.  After two days trying to find some C examples showing how to do such things (suprisingly uncommon, considering how much such things are done!) This was built and run in CodeBlocks 16.01 just fine, once I&#039;d also figured out what library linkage to add to the projects build options.   (..\..\..\..\MinGW\lib\libws2_32.a)  In both the Release and Debug contexts, using C::B 16.01 on Windows 7 Pro 64 bit.   (The resulting exe is only 10k in size!)

Re the comment about &quot;While(True)&quot; and potential CPU usage.   That&#039;s as maybe, but I see no such huge CPU usage, just a brief spike when the project first loads, then the CPU usage for the project drops to zero while nothing is happening.   I&#039;m using PuTTY as the client for testing, that sucks more CPU (0.01%!) than the echo server when it&#039;s idle.   Using the excelent Process Explorer tool to examine whats going on in the system.    https://technet.microsoft.com/en-gb/sysinternals/bb896653    By Mark Russinovich.

What would be good to know how to do, is to bind to only the loopback address, and/or only accept incoming connections FROM the loopback address (for some sort of simple security, rather than expose it to the external LAN, or much wider world!)

Many thanks again from a relative C novice.

Dave B.   (Yes you may contact me if needed.)]]></description>
			<content:encoded><![CDATA[<p>Nice, very nice.  After two days trying to find some C examples showing how to do such things (suprisingly uncommon, considering how much such things are done!) This was built and run in CodeBlocks 16.01 just fine, once I&#8217;d also figured out what library linkage to add to the projects build options.   (..\..\..\..\MinGW\lib\libws2_32.a)  In both the Release and Debug contexts, using C::B 16.01 on Windows 7 Pro 64 bit.   (The resulting exe is only 10k in size!)</p>
<p>Re the comment about &#8220;While(True)&#8221; and potential CPU usage.   That&#8217;s as maybe, but I see no such huge CPU usage, just a brief spike when the project first loads, then the CPU usage for the project drops to zero while nothing is happening.   I&#8217;m using PuTTY as the client for testing, that sucks more CPU (0.01%!) than the echo server when it&#8217;s idle.   Using the excelent Process Explorer tool to examine whats going on in the system.    <a href="https://technet.microsoft.com/en-gb/sysinternals/bb896653" rel="nofollow ugc">https://technet.microsoft.com/en-gb/sysinternals/bb896653</a>    By Mark Russinovich.</p>
<p>What would be good to know how to do, is to bind to only the loopback address, and/or only accept incoming connections FROM the loopback address (for some sort of simple security, rather than expose it to the external LAN, or much wider world!)</p>
<p>Many thanks again from a relative C novice.</p>
<p>Dave B.   (Yes you may contact me if needed.)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wibble		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-91720</link>

		<dc:creator><![CDATA[wibble]]></dc:creator>
		<pubDate>Thu, 18 Aug 2016 13:53:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-91720</guid>

					<description><![CDATA[Opening 32 sockets is not a simple example.]]></description>
			<content:encoded><![CDATA[<p>Opening 32 sockets is not a simple example.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: GoodAdvice		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-67392</link>

		<dc:creator><![CDATA[GoodAdvice]]></dc:creator>
		<pubDate>Wed, 10 Sep 2014 14:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-67392</guid>

					<description><![CDATA[good as a temporary solution
the while (true) instruction will occupy the whole cpu ressources and this is not acceptable, an event based solution should be considered.]]></description>
			<content:encoded><![CDATA[<p>good as a temporary solution<br />
the while (true) instruction will occupy the whole cpu ressources and this is not acceptable, an event based solution should be considered.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: .		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-66027</link>

		<dc:creator><![CDATA[.]]></dc:creator>
		<pubDate>Tue, 18 Mar 2014 14:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-66027</guid>

					<description><![CDATA[this is the best tutorial i have ever seen .. it helps me a lot . but , is there any tutorial on how to transport files through socket ,,if any ,please give me a link.]]></description>
			<content:encoded><![CDATA[<p>this is the best tutorial i have ever seen .. it helps me a lot . but , is there any tutorial on how to transport files through socket ,,if any ,please give me a link.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Max		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-66012</link>

		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Tue, 11 Mar 2014 14:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-66012</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65073&quot;&gt;Silver Moon&lt;/a&gt;.

Actually, the telnet protocol works that way, a character at a time. This happens both in Windows and in Unix.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65073">Silver Moon</a>.</p>
<p>Actually, the telnet protocol works that way, a character at a time. This happens both in Windows and in Unix.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65073</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 25 Apr 2013 08:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-65073</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65066&quot;&gt;gkalyan&lt;/a&gt;.

this happens on windows, because the windows telnet client is in character mode.
in character mode the telnet client will send the individual characters the moment they are typed.

the only solution to this is to set the windows telnet client to &quot;line mode&quot;, which I dont know how to do.
best solution is to use ncat program which comes with nmap. It is a telnet like utility with similar syntax.

C:&#062; ncat localhost 5000

ncat will send full lines on pressing the enter key. Or use putty in &quot;passive negotiation mode&quot; and it will send only full lines on pressing enter key.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65066">gkalyan</a>.</p>
<p>this happens on windows, because the windows telnet client is in character mode.<br />
in character mode the telnet client will send the individual characters the moment they are typed.</p>
<p>the only solution to this is to set the windows telnet client to &#8220;line mode&#8221;, which I dont know how to do.<br />
best solution is to use ncat program which comes with nmap. It is a telnet like utility with similar syntax.</p>
<p>C:&gt; ncat localhost 5000</p>
<p>ncat will send full lines on pressing the enter key. Or use putty in &#8220;passive negotiation mode&#8221; and it will send only full lines on pressing enter key.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: gkalyan		</title>
		<link>https://www.binarytides.com/code-tcp-socket-server-winsock/comment-page-1/#comment-65066</link>

		<dc:creator><![CDATA[gkalyan]]></dc:creator>
		<pubDate>Thu, 25 Apr 2013 07:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4598#comment-65066</guid>

					<description><![CDATA[Thanks for this. However, the telnet client is sending only one byte at a time. I&#039;m not able to figure out why though. When I start typing in the telnet client, say &quot;ABC&quot;, each character is sent, printed at the server and returned to the client. So, when I type say &quot;ABC&quot; in the client, it actually reads &quot;AABBCC&quot;. Any ideas? Thanks for your help.]]></description>
			<content:encoded><![CDATA[<p>Thanks for this. However, the telnet client is sending only one byte at a time. I&#8217;m not able to figure out why though. When I start typing in the telnet client, say &#8220;ABC&#8221;, each character is sent, printed at the server and returned to the client. So, when I type say &#8220;ABC&#8221; in the client, it actually reads &#8220;AABBCC&#8221;. Any ideas? Thanks for your help.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
