Answered step by step
Verified Expert Solution
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 clientserver 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 Usersjillpythonfilesclientpy line in
server.connectADDRESS # Connect it to a host
ConnectionRefusedError: Errno 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
ADDRESS HOST PORT
server socketAFINET, SOCKSTREAM
server.bindADDRESS
File: client.py
from socket import
from codecs import decode
HOST "localhost"
PORT
BUFSIZE
ADDRESS HOST PORT
server socketAFINET, SOCKSTREAM # Create a socket
server.connectADDRESS # Connect it to a host
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started