Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jill is developing a client / server program. Her server script launches without a problem, but she receives the following error message when she launches

Jill is developing a client/server program. Her server script launches without a problem, but she receives the following error message when she launches the clients script:
Traceback (most recent call last):
File "/Users/jill/pythonfiles/client.py", line 15, in
server.connect(ADDRESS) # Connect it to a host
ConnectionRefusedError: [Errno 61] Connection refused
Here are the code segments in her server and client scripts that are responsible for setting up the connection:
"""
File: server.py
"""
from socket import *
from codecs import decode
HOST = "localhost"
PORT =6000
ADDRESS =(HOST, PORT)
server = socket(AF_INET, SOCK_STREAM)
server.bind(ADDRESS)
"""
File: client.py
"""
from socket import *
from codecs import decode
HOST = "localhost"
PORT =5000
BUFSIZE =1024
ADDRESS =(HOST, PORT)
server = socket(AF_INET, SOCK_STREAM) # Create a socket
server.connect(ADDRESS) # Connect it to a host

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

Describe the concept of diversity.

Answered: 1 week ago

Question

What did they do? What did they say?

Answered: 1 week ago