<?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: Python socket programming Tutorial &#8211; How to Code Client and Server	</title>
	<atom:link href="https://www.binarytides.com/python-socket-programming-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/python-socket-programming-tutorial/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Wed, 04 May 2022 00:27:03 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Python socket network programming - Yasoob Khalid - Link Bid Script		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-336447</link>

		<dc:creator><![CDATA[Python socket network programming - Yasoob Khalid - Link Bid Script]]></dc:creator>
		<pubDate>Wed, 04 May 2022 00:27:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-336447</guid>

					<description><![CDATA[[&#8230;] However there’s a lot more to it. For further study i recommend the Official python docs and this article on binary tides. If you liked this post then don’t forget to share it on facebook, tweet it on [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] However there’s a lot more to it. For further study i recommend the Official python docs and this article on binary tides. If you liked this post then don’t forget to share it on facebook, tweet it on [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Noob		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-319264</link>

		<dc:creator><![CDATA[Noob]]></dc:creator>
		<pubDate>Thu, 10 Jun 2021 15:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-319264</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344&quot;&gt;Nayan Khanna&lt;/a&gt;.

Use threading instead  here:https://www.tutorialspoint.com/python/python_multithreading.htm]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344">Nayan Khanna</a>.</p>
<p>Use threading instead  here:<a href="https://www.tutorialspoint.com/python/python_multithreading.htm" rel="nofollow ugc">https://www.tutorialspoint.com/python/python_multithreading.htm</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Junaid		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-198200</link>

		<dc:creator><![CDATA[Junaid]]></dc:creator>
		<pubDate>Sat, 01 Jun 2019 02:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-198200</guid>

					<description><![CDATA[Thank you for the great tutorial.

Anyone tried handling multiple connections binding multiple ports?

Any help would be appreciated.]]></description>
			<content:encoded><![CDATA[<p>Thank you for the great tutorial.</p>
<p>Anyone tried handling multiple connections binding multiple ports?</p>
<p>Any help would be appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bob Levin		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-165922</link>

		<dc:creator><![CDATA[Bob Levin]]></dc:creator>
		<pubDate>Thu, 16 Aug 2018 23:04:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-165922</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344&quot;&gt;Nayan Khanna&lt;/a&gt;.

It&#039;s been a while, but if someone encounters this in the future - you can either import _thread or import threading module and then replace the last while loop with something like this:

...
while True:
    # wait to accept a connection - blocking call
    conn, addr = s.accept()
    # display client info
    print(&quot;Connected with {}:{}&quot;.format(addr[0], addr[1]))
    
    t = threading.Thread(target=client_thread, args=(conn,))
    threads_list.append(t)
    t.start()

for t in threads_list:
    t.join()

s.close()]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344">Nayan Khanna</a>.</p>
<p>It&#8217;s been a while, but if someone encounters this in the future &#8211; you can either import _thread or import threading module and then replace the last while loop with something like this:</p>
<p>&#8230;<br />
while True:<br />
    # wait to accept a connection &#8211; blocking call<br />
    conn, addr = s.accept()<br />
    # display client info<br />
    print(&#8220;Connected with {}:{}&#8221;.format(addr[0], addr[1]))</p>
<p>    t = threading.Thread(target=client_thread, args=(conn,))<br />
    threads_list.append(t)<br />
    t.start()</p>
<p>for t in threads_list:<br />
    t.join()</p>
<p>s.close()</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: killua		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-165257</link>

		<dc:creator><![CDATA[killua]]></dc:creator>
		<pubDate>Sat, 28 Jul 2018 23:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-165257</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-151012&quot;&gt;Peter Mose-Christensen&lt;/a&gt;.

he said &#039;except socket.error, msg:&#039; because he was using python2
python3 is &#039;except socket.error as msg:&#039;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-151012">Peter Mose-Christensen</a>.</p>
<p>he said &#8216;except socket.error, msg:&#8217; because he was using python2<br />
python3 is &#8216;except socket.error as msg:&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yuriy Hab		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-163479</link>

		<dc:creator><![CDATA[Yuriy Hab]]></dc:creator>
		<pubDate>Fri, 06 Jul 2018 09:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-163479</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344&quot;&gt;Nayan Khanna&lt;/a&gt;.

You can use _thread.start_new_thread in Python  3.6 =)
and also, if you want do like object from string, you can use u&#039;some_text&#039;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344">Nayan Khanna</a>.</p>
<p>You can use _thread.start_new_thread in Python  3.6 =)<br />
and also, if you want do like object from string, you can use u&#8217;some_text&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nayan Khanna		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-159344</link>

		<dc:creator><![CDATA[Nayan Khanna]]></dc:creator>
		<pubDate>Thu, 31 May 2018 15:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-159344</guid>

					<description><![CDATA[start_new_thread and thread.start_new_thread is not working on python 3.6 
Can somebody please suggest the solution
Also guys, note that if you get an error called expected byte like object not a string object:
use reply.encode(&#039;utf-8&#039;) in sendall.

And if the same with data that it is a string and it needs a byte like object in reply then use
reply = &#039;OK&#039; + data.decode(&#039;utf-8&#039;)]]></description>
			<content:encoded><![CDATA[<p>start_new_thread and thread.start_new_thread is not working on python 3.6<br />
Can somebody please suggest the solution<br />
Also guys, note that if you get an error called expected byte like object not a string object:<br />
use reply.encode(&#8216;utf-8&#8217;) in sendall.</p>
<p>And if the same with data that it is a string and it needs a byte like object in reply then use<br />
reply = &#8216;OK&#8217; + data.decode(&#8216;utf-8&#8217;)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Amar Shukla		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-157999</link>

		<dc:creator><![CDATA[Amar Shukla]]></dc:creator>
		<pubDate>Tue, 08 May 2018 09:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-157999</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-67966&quot;&gt;nilesh&lt;/a&gt;.

Because code is using this statement -
from thread import *
it&#039;s fetching all available methods of thread class into current script.

Therefore you  don&#039;t need to write -
thread.start_new_thread()

I hope it clears the confusion.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-67966">nilesh</a>.</p>
<p>Because code is using this statement &#8211;<br />
from thread import *<br />
it&#8217;s fetching all available methods of thread class into current script.</p>
<p>Therefore you  don&#8217;t need to write &#8211;<br />
thread.start_new_thread()</p>
<p>I hope it clears the confusion.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Krish		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-157933</link>

		<dc:creator><![CDATA[Krish]]></dc:creator>
		<pubDate>Sat, 05 May 2018 17:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-157933</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-146854&quot;&gt;John&lt;/a&gt;.

Anyone please? Same doubt. 
Any help would be appreciated. 
Thanks.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-146854">John</a>.</p>
<p>Anyone please? Same doubt.<br />
Any help would be appreciated.<br />
Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Oleks		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-157610</link>

		<dc:creator><![CDATA[Oleks]]></dc:creator>
		<pubDate>Sun, 22 Apr 2018 13:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-157610</guid>

					<description><![CDATA[Great tutorial!
Thank you]]></description>
			<content:encoded><![CDATA[<p>Great tutorial!<br />
Thank you</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wasit		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-157297</link>

		<dc:creator><![CDATA[wasit]]></dc:creator>
		<pubDate>Thu, 12 Apr 2018 06:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-157297</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155656&quot;&gt;Oliver Palmer&lt;/a&gt;.

You’re running an ad hoc network. Forget that... make one the client and one the server]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155656">Oliver Palmer</a>.</p>
<p>You’re running an ad hoc network. Forget that&#8230; make one the client and one the server</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mp		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-155989</link>

		<dc:creator><![CDATA[mp]]></dc:creator>
		<pubDate>Sat, 03 Mar 2018 13:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-155989</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-67267&quot;&gt;Earth Defender&lt;/a&gt;.

Learnt...  Help us all.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-67267">Earth Defender</a>.</p>
<p>Learnt&#8230;  Help us all.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Oliver Palmer		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155890</link>

		<dc:creator><![CDATA[Oliver Palmer]]></dc:creator>
		<pubDate>Tue, 27 Feb 2018 19:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-155890</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155656&quot;&gt;Oliver Palmer&lt;/a&gt;.

This is now all fixed. However this week all my Pis stopped connecting to each other and wouldn&#039;t assign my PC an address from the subnet - I hadn&#039;t touched them in this time, just started them up and nothing. I have reconfigured it all now though. Strange but any ideas what could&#039;ve caused this?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155656">Oliver Palmer</a>.</p>
<p>This is now all fixed. However this week all my Pis stopped connecting to each other and wouldn&#8217;t assign my PC an address from the subnet &#8211; I hadn&#8217;t touched them in this time, just started them up and nothing. I have reconfigured it all now though. Strange but any ideas what could&#8217;ve caused this?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Oliver Palmer		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-155656</link>

		<dc:creator><![CDATA[Oliver Palmer]]></dc:creator>
		<pubDate>Tue, 20 Feb 2018 10:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-155656</guid>

					<description><![CDATA[Hi, having followed all of the above on a raspberry pi running an ADHOC network, I&#039;m running into Error Code: -3, Temporary failure in name resolution. Any idea what&#039;s causing this and how to fix it?
I&#039;m hoping to use the Pi&#039;s to send data to one central &#039;server&#039; for collation in a file (this error is on the host Pi) in an IoT style framework - this is a 3rd year university project but having never programmed in Python before I&#039;m getting hung up everywhere...
Any help appreciated.]]></description>
			<content:encoded><![CDATA[<p>Hi, having followed all of the above on a raspberry pi running an ADHOC network, I&#8217;m running into Error Code: -3, Temporary failure in name resolution. Any idea what&#8217;s causing this and how to fix it?<br />
I&#8217;m hoping to use the Pi&#8217;s to send data to one central &#8216;server&#8217; for collation in a file (this error is on the host Pi) in an IoT style framework &#8211; this is a 3rd year university project but having never programmed in Python before I&#8217;m getting hung up everywhere&#8230;<br />
Any help appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Peter Mose-Christensen		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-151012</link>

		<dc:creator><![CDATA[Peter Mose-Christensen]]></dc:creator>
		<pubDate>Wed, 10 Jan 2018 20:20:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-151012</guid>

					<description><![CDATA[First thank you for a great tutorial.
There are som typos:
&#039;except socket.error, msg:&#039; should be
&#039;except socket.error as msg:&#039;]]></description>
			<content:encoded><![CDATA[<p>First thank you for a great tutorial.<br />
There are som typos:<br />
&#8216;except socket.error, msg:&#8217; should be<br />
&#8216;except socket.error as msg:&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: John		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-3/#comment-146854</link>

		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Thu, 14 Dec 2017 00:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-146854</guid>

					<description><![CDATA[Computer 1 is Ubuntu and computer 2 is windows.
The code runs ok when both the client and server are on computer 1.
However, when I run the server code on computer 1 and the client code on computer 2, I get the following error:
   &quot;ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it&quot;

What do I have to do to make the code work between two computers?]]></description>
			<content:encoded><![CDATA[<p>Computer 1 is Ubuntu and computer 2 is windows.<br />
The code runs ok when both the client and server are on computer 1.<br />
However, when I run the server code on computer 1 and the client code on computer 2, I get the following error:<br />
   &#8220;ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it&#8221;</p>
<p>What do I have to do to make the code work between two computers?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ivan		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-144177</link>

		<dc:creator><![CDATA[Ivan]]></dc:creator>
		<pubDate>Wed, 29 Nov 2017 19:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-144177</guid>

					<description><![CDATA[Perfect!]]></description>
			<content:encoded><![CDATA[<p>Perfect!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Okwii		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-139468</link>

		<dc:creator><![CDATA[David Okwii]]></dc:creator>
		<pubDate>Tue, 07 Nov 2017 08:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-139468</guid>

					<description><![CDATA[Well explained post. Thanks. However, I have a condition where the client hangs on the connection even after the receiving the response. I have checked and ensured that all connections are closed after response is given back to the client.]]></description>
			<content:encoded><![CDATA[<p>Well explained post. Thanks. However, I have a condition where the client hangs on the connection even after the receiving the response. I have checked and ensured that all connections are closed after response is given back to the client.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ian		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-139157</link>

		<dc:creator><![CDATA[Ian]]></dc:creator>
		<pubDate>Sat, 04 Nov 2017 13:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-139157</guid>

					<description><![CDATA[Hi, thanks for this great tutorial, I just have one question.
When I enter a letter into the cmd console the program doesn&#039;t wait for the enter key to be pressed, it automatically returns the &quot;OK .. &quot; message with the first key I press. I have searched for an answer on the internet but without success. Can anyone help please?
Ian]]></description>
			<content:encoded><![CDATA[<p>Hi, thanks for this great tutorial, I just have one question.<br />
When I enter a letter into the cmd console the program doesn&#8217;t wait for the enter key to be pressed, it automatically returns the &#8220;OK .. &#8221; message with the first key I press. I have searched for an answer on the internet but without success. Can anyone help please?<br />
Ian</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: TST		</title>
		<link>https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-126878</link>

		<dc:creator><![CDATA[TST]]></dc:creator>
		<pubDate>Sun, 13 Aug 2017 18:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=2204#comment-126878</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-99728&quot;&gt;Chuggz&lt;/a&gt;.

Same for me. This tutorial did a better job then by Prof. This is a great start. 
Thanks.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/python-socket-programming-tutorial/comment-page-2/#comment-99728">Chuggz</a>.</p>
<p>Same for me. This tutorial did a better job then by Prof. This is a great start.<br />
Thanks.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
