<?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: UDP Socket programming in winsock &#8211; How to code Client and Server	</title>
	<atom:link href="https://www.binarytides.com/udp-socket-programming-in-winsock/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/udp-socket-programming-in-winsock/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Fri, 13 Oct 2023 18:11:30 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Chuan		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-361221</link>

		<dc:creator><![CDATA[Chuan]]></dc:creator>
		<pubDate>Fri, 13 Oct 2023 18:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-361221</guid>

					<description><![CDATA[Hi,

do you have source ?

Thanks,
Chuan]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>do you have source ?</p>
<p>Thanks,<br />
Chuan</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lostgallifreyan		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-350440</link>

		<dc:creator><![CDATA[Lostgallifreyan]]></dc:creator>
		<pubDate>Sat, 21 Jan 2023 18:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-350440</guid>

					<description><![CDATA[Thanks for this, it&#039;s good to see clean, complete C code for a solid start on new stuff. I&#039;d been looking for NTP code but this is better, more useful for a general base in UDP. (I found a TCP variant of this code elsewhere, last night, same program structure, same port 8888 too. I&#039;m not sure whether that was based on this but it looks like it. That one worked easily when modified to compile with both GCC and TCC with Winsock2 so I know this will too). These small examples are nice for converting to a single thread for a Windows program too. It&#039;s clean enough to make it easy to figure out what to change.]]></description>
			<content:encoded><![CDATA[<p>Thanks for this, it&#8217;s good to see clean, complete C code for a solid start on new stuff. I&#8217;d been looking for NTP code but this is better, more useful for a general base in UDP. (I found a TCP variant of this code elsewhere, last night, same program structure, same port 8888 too. I&#8217;m not sure whether that was based on this but it looks like it. That one worked easily when modified to compile with both GCC and TCC with Winsock2 so I know this will too). These small examples are nice for converting to a single thread for a Windows program too. It&#8217;s clean enough to make it easy to figure out what to change.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Fellow Programmer		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-345931</link>

		<dc:creator><![CDATA[Fellow Programmer]]></dc:creator>
		<pubDate>Tue, 08 Nov 2022 23:48:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-345931</guid>

					<description><![CDATA[Thanks for writing that article!

Quick notes:

Regarding ncat:

With version 7.93, &quot;ncat -vv -u localhost 8888&quot; translates &quot;localhost&quot; to the value &quot;1&quot;. When sending text , ncat reports...

Ncat: Connected to ::1:8888.

...and subsequently reports a read error, and that the connection was forcibly closed by the remote host.

If you instead use 127.0.0.1 for the server address, everything else works as written above.

FWIW, ncat correctly translates other hostnames to their IP address. So version 7.93 apparently does not handle &quot;localhost&quot; in particular, which is surprising.

Regarding winsock2:

In a source file that includes windows.h, it can be important to include winsock2.h before that, otherwise winsock.h will define symbols that conflict with those in winsock2.h.

I hope that helps.

Thanks again!]]></description>
			<content:encoded><![CDATA[<p>Thanks for writing that article!</p>
<p>Quick notes:</p>
<p>Regarding ncat:</p>
<p>With version 7.93, &#8220;ncat -vv -u localhost 8888&#8221; translates &#8220;localhost&#8221; to the value &#8220;1&#8221;. When sending text , ncat reports&#8230;</p>
<p>Ncat: Connected to ::1:8888.</p>
<p>&#8230;and subsequently reports a read error, and that the connection was forcibly closed by the remote host.</p>
<p>If you instead use 127.0.0.1 for the server address, everything else works as written above.</p>
<p>FWIW, ncat correctly translates other hostnames to their IP address. So version 7.93 apparently does not handle &#8220;localhost&#8221; in particular, which is surprising.</p>
<p>Regarding winsock2:</p>
<p>In a source file that includes windows.h, it can be important to include winsock2.h before that, otherwise winsock.h will define symbols that conflict with those in winsock2.h.</p>
<p>I hope that helps.</p>
<p>Thanks again!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: #NIJONYMI		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-332245</link>

		<dc:creator><![CDATA[#NIJONYMI]]></dc:creator>
		<pubDate>Sat, 05 Feb 2022 07:57:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-332245</guid>

					<description><![CDATA[Hi, 
Very well written, explained and coded. Thank you.

First time that I use UDP to communicate with Arduino as a server and my program on the pc as a client that sends a 2-byte command to the Arduino and it works perfectly.

However. I have a little doubt: once the socket is closed, can I flip the roles? that is, make the arduino as a client and the program as a server to monitor events such as hardware interrupts?.

Maybe by the time you answer I will have solved it, but anyway, thank you very much in advance.]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Very well written, explained and coded. Thank you.</p>
<p>First time that I use UDP to communicate with Arduino as a server and my program on the pc as a client that sends a 2-byte command to the Arduino and it works perfectly.</p>
<p>However. I have a little doubt: once the socket is closed, can I flip the roles? that is, make the arduino as a client and the program as a server to monitor events such as hardware interrupts?.</p>
<p>Maybe by the time you answer I will have solved it, but anyway, thank you very much in advance.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: 365cent		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-331830</link>

		<dc:creator><![CDATA[365cent]]></dc:creator>
		<pubDate>Mon, 31 Jan 2022 02:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-331830</guid>

					<description><![CDATA[Nice codes, thanks for sharing. I am trying to add checksum for verification.]]></description>
			<content:encoded><![CDATA[<p>Nice codes, thanks for sharing. I am trying to add checksum for verification.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ren		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-330717</link>

		<dc:creator><![CDATA[Ren]]></dc:creator>
		<pubDate>Tue, 11 Jan 2022 08:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-330717</guid>

					<description><![CDATA[I thank you very much for this program... very good UPD program...]]></description>
			<content:encoded><![CDATA[<p>I thank you very much for this program&#8230; very good UPD program&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Saeed Mahmoodi		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-311222</link>

		<dc:creator><![CDATA[Saeed Mahmoodi]]></dc:creator>
		<pubDate>Fri, 22 Jan 2021 22:14:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-311222</guid>

					<description><![CDATA[exacly what i was loking for! perfect.]]></description>
			<content:encoded><![CDATA[<p>exacly what i was loking for! perfect.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Prometheus1998_		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-204967</link>

		<dc:creator><![CDATA[Prometheus1998_]]></dc:creator>
		<pubDate>Thu, 15 Aug 2019 01:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-204967</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-101800&quot;&gt;Batti&lt;/a&gt;.

It&#039;s the other way around. The connect() function will return an error on a datagram-type socket like UDP, whereas binding a socket to a hint structure is always required for servers (which is NOT, despite your claim, TCP/IP exclusive).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-101800">Batti</a>.</p>
<p>It&#8217;s the other way around. The connect() function will return an error on a datagram-type socket like UDP, whereas binding a socket to a hint structure is always required for servers (which is NOT, despite your claim, TCP/IP exclusive).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Correya		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-152263</link>

		<dc:creator><![CDATA[Aaron Correya]]></dc:creator>
		<pubDate>Mon, 22 Jan 2018 08:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-152263</guid>

					<description><![CDATA[Hello,

I want to use UDP to communicate between two program (script  and SIMULINK) . So I tried to open one Socket (IP (127.0.0.1 ) ,remote address 1234 Local port 25)  for transmit and one socket for Receive  (IP (127.0.0.1 ) ,remote address 4321 Local port 88).
but when i open two sockets and try a send to im getting a WSAERROR (10047)) .
If i remove the receive socket and try it starts to send .
Can you please help me ??]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I want to use UDP to communicate between two program (script  and SIMULINK) . So I tried to open one Socket (IP (127.0.0.1 ) ,remote address 1234 Local port 25)  for transmit and one socket for Receive  (IP (127.0.0.1 ) ,remote address 4321 Local port 88).<br />
but when i open two sockets and try a send to im getting a WSAERROR (10047)) .<br />
If i remove the receive socket and try it starts to send .<br />
Can you please help me ??</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anonymous		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-123726</link>

		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Thu, 13 Jul 2017 17:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-123726</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-68040&quot;&gt;abhinav&lt;/a&gt;.

#define SERVER &quot;127.0.0.1&quot;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-68040">abhinav</a>.</p>
<p>#define SERVER &#8220;127.0.0.1&#8221;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jACKwang		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-118688</link>

		<dc:creator><![CDATA[jACKwang]]></dc:creator>
		<pubDate>Wed, 17 May 2017 07:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-118688</guid>

					<description><![CDATA[When I test the code, I find that the SendTo（） function can only be executed about 1000 times per second, and how to improve the SendTo（） function per second？？3Q]]></description>
			<content:encoded><![CDATA[<p>When I test the code, I find that the SendTo（） function can only be executed about 1000 times per second, and how to improve the SendTo（） function per second？？3Q</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jan Skála		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-113667</link>

		<dc:creator><![CDATA[Jan Skála]]></dc:creator>
		<pubDate>Mon, 03 Apr 2017 18:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-113667</guid>

					<description><![CDATA[Thank you for this tutorial, finally I found working solution.]]></description>
			<content:encoded><![CDATA[<p>Thank you for this tutorial, finally I found working solution.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Batti		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-101800</link>

		<dc:creator><![CDATA[Batti]]></dc:creator>
		<pubDate>Thu, 05 Jan 2017 06:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-101800</guid>

					<description><![CDATA[hi but as i understood there is no need for bind in the UDP protocol we need just to connect and also we can&#039;t use sockaddr_in witch is working only with the TCP/IP protocol]]></description>
			<content:encoded><![CDATA[<p>hi but as i understood there is no need for bind in the UDP protocol we need just to connect and also we can&#8217;t use sockaddr_in witch is working only with the TCP/IP protocol</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Wilmes		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-96413</link>

		<dc:creator><![CDATA[Christian Wilmes]]></dc:creator>
		<pubDate>Wed, 19 Oct 2016 11:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-96413</guid>

					<description><![CDATA[great example! it is simple and it works out-of-the-box!]]></description>
			<content:encoded><![CDATA[<p>great example! it is simple and it works out-of-the-box!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: abhinav		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-68040</link>

		<dc:creator><![CDATA[abhinav]]></dc:creator>
		<pubDate>Fri, 11 Sep 2015 09:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-68040</guid>

					<description><![CDATA[this isnt working on two laptops connected via Ethernet. What modifications are required for that ?]]></description>
			<content:encoded><![CDATA[<p>this isnt working on two laptops connected via Ethernet. What modifications are required for that ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ajay		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-65025</link>

		<dc:creator><![CDATA[ajay]]></dc:creator>
		<pubDate>Mon, 01 Apr 2013 13:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-65025</guid>

					<description><![CDATA[Great....
thankx a lot]]></description>
			<content:encoded><![CDATA[<p>Great&#8230;.<br />
thankx a lot</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: chiran		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-64900</link>

		<dc:creator><![CDATA[chiran]]></dc:creator>
		<pubDate>Wed, 09 Jan 2013 14:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-64900</guid>

					<description><![CDATA[How to recvfrom on muliple server ports?? Any ideas plz..]]></description>
			<content:encoded><![CDATA[<p>How to recvfrom on muliple server ports?? Any ideas plz..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: vanner		</title>
		<link>https://www.binarytides.com/udp-socket-programming-in-winsock/comment-page-1/#comment-56641</link>

		<dc:creator><![CDATA[vanner]]></dc:creator>
		<pubDate>Thu, 04 Oct 2012 14:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=2778#comment-56641</guid>

					<description><![CDATA[This a great, complete, udp application. Thanks very much.]]></description>
			<content:encoded><![CDATA[<p>This a great, complete, udp application. Thanks very much.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
