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 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
