I want to build on these examples to create a chat session. Can I use "import socket" in Python code with these examples? I see the word socket is employed in the code examples. I'm curious if this word can be reused.
On 3/8/15, Michael Cuggy <[email protected]> wrote: > The repo link had the code that I needed. Thank you for the solution. > I hope Zeromq.org can update its site. The technology itself would be > more accessible if the corresponding server version of the Python > script was clearly noted. I think the comments of both the client and > server versions should indicate that they are each a member of a pair. > > On 3/8/15, MinRK <[email protected]> wrote: >> Hello World is a client + server example. You need to be running the >> hwserver program, described above the link to hwclient in the Guide. The >> Python version *should* be available at >> http://zguide.zeromq.org/py:hwserver, >> but for some reason the hwserver links aren’t in the Guide. You can find >> it >> in >> the examples repo >> <https://github.com/imatix/zguide/blob/master/examples/Python/hwserver.py> >> in the meantime. >> >> -MinRK >> >> >> On Sat, Mar 7, 2015 at 8:47 PM, Michael Cuggy <[email protected]> wrote: >> >>> Hello, >>> >>> "On your example, are you running the requisite request receiver, eg >>> the python script that binds to port 5555 in order that the server can >>> have something to connect to?" >>> >>> Yes, I think so. Can you help me with this as I seem to have made a >>> mistake? >>> >>> To be honest, I thought it was supposed to run by itself with no other >>> server: >>> >>> http://zguide.zeromq.org/py:hwclient >>> >>> The loop back address in the code snippet above made me think it could >>> be a standalone test. I have a pair of Linux servers. >>> >>> One server has this: >>> http://pastebin.com/nGc36Dq1 >>> >>> A second server has this: >>> http://pastebin.com/EVzCSKMn >>> >>> When I run both, I only see this: >>> >>> Connecting to hello world server... >>> Sending request 0 ... >>> >>> It just hangs forever. I don't think there is a security restriction >>> preventing the communication.* But the communication never happens, >>> so I don't know what is wrong. >>> >>> thanks, >>> >>> Mike >>> >>> * I ran an nmap command to test connectivity on port 5555 on both >>> servers. The results indicate that the port isn't being blocked. It >>> says "closed" and not "filtered." Filtered would indicate that the >>> nmap utility's probe was being dropped. A probe being dropped means >>> that a firewall is blocking connectivity on that port. This is not >>> the case. "Closed" indicates a lack of usage but not firewall >>> blockage. >>> >>> I therefore don't understand how to get ZeroMQ working using the >>> Python code on zeromoq.org. >>> >>> >>> On 3/1/15, Kenneth Adam Miller <[email protected]> wrote: >>> > On your example, are you running the requisite request receiver, eg >>> > the >>> > python script that binds to port 5555 in order that the server can >>> > have >>> > something to connect to? Just checking. >>> > >>> > Well it depends on what all you want it to do in what scenario. If >>> > these >>> > are two typical user machines, you might need tcp hole punching to get >>> past >>> > firewalls to start with. There's libraries for that, and I'll probably >>> > go >>> > through that soon for my application. >>> > >>> > Also, you don't have to start from scratch, you could easily work from >>> one >>> > of the plethora of existing messaging clients and extend them, or at >>> least >>> > read their source to see how they work. >>> > >>> > On Mon, Mar 2, 2015 at 12:29 AM, Michael Cuggy <[email protected]> >>> > wrote: >>> > >>> >> Hello, >>> >> >>> >> I am using RHEL v. 7.x on AWS. I installed ZeroMQ 4.0.5. I want to >>> >> create a basic program using Python and ZeroMQ that serves as a chat >>> >> service for human users using Linux on a LAN. >>> >> >>> >> I have made a significant effort. I installed the prerequisites for >>> >> ZeroMQ and ZeroMQ itself. I installed the Python bindings. >>> >> >>> >> The problem is that I cannot even get a Hello World program to work >>> >> on >>> >> one server. But I used the Hello World program that was on the >>> >> zeromq.org page. (http://zguide.zeromq.org/py:hwclient) >>> >> >>> >> Here is what I get (after running python hello.py): >>> >> >>> >> "Connecting to hello world server >>> >> Sending request 0" >>> >> >>> >> It pauses indefinitely after this. I have to escape out with Ctrl-c. >>> >> >>> >> Can I get step-by-step directions on how to create a messaging >>> >> program >>> >> using Python and Zeromq? I just want it to work between two Linux >>> >> machines to start with. It is just problem after problem. If no one >>> >> knows of such documentation, can someone please tell me why I cannot >>> >> see "Hello World" via the Python program that ZeroMQ.org provides? >>> >> To >>> >> me it just >>> >> pauses after "Sending request 0." >>> >> >>> >> thanks, >>> >> >>> >> Mike >>> >> _______________________________________________ >>> >> zeromq-dev mailing list >>> >> [email protected] >>> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> >>> > >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
