<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="VcsDirectoryMappings"> | |||||
<mapping directory="$PROJECT_DIR$" vcs="Git" /> | |||||
</component> | |||||
</project> |
import socket | |||||
myserver = socket.socket() | |||||
hostname = myserver.gethostname() | |||||
port = 12345 | |||||
myserver.bind((hostname, port)) | |||||
myserver.listen() | |||||
while True: | |||||
(connection, addr) = myserver.accept() | |||||
msg_from_client = myserver.recv(1024) | |||||
in_capital_letters = msg_from_client.upper() | |||||
connection.send(in_capital_letters.encode('utf-8')) | |||||
connection.close() | |||||
import socket | |||||
myclient = socket.socket() | |||||
hostname = myserver.gethostname() | |||||
port = 12345 | |||||
myclient.connect((hostname, port)) | |||||