Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have these two programs where the server is run (2nd pic) and waits for the 1st program to run which sends it a 'hello

image text in transcribed

image text in transcribed

I have these two programs where the server is run (2nd pic) and waits for the 1st program to run which sends it a 'hello world' message before they both close. I'd like to have them changed so they can constantly be sending each other messages, maybe taking input from the terminal and when something is typed, is sent to the other one. Or if that is not possible, then just have one constantly sending to the other instead of both doing so.

import socket tcpip= '192.168.1.6' tcp-port 62 bufsize = 1024 msg= "Hello, World !" b = bytearray() b.extend (map (ord, msg)) - - s- socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.connect ( (tcp_ip, tcp_port)) s.send (b) s.close () import socket tcpip= '192.168.1.6' tcp-port 62 bufsize = 1024 msg= "Hello, World !" b = bytearray() b.extend (map (ord, msg)) - - s- socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.connect ( (tcp_ip, tcp_port)) s.send (b) s.close ()

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Summarize changes in self, environment, and other-oriented values?

Answered: 1 week ago