Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!