#!/usr/bin/python3

from threading import Thread
import socket

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server1.connect(('192.168.43.171', 443))
server1.send('start'.encode('utf-8'))
print(server1.recv(4096))
server1.close()
server.bind(('192.168.43.1', 443))
server.listen()

def handler(client_socket):
 oke = client_socket.recv(1024).decode('utf-8')
 client_socket.send(str(input('apa: ')).encode('utf-8'))
 client_socket.close()

while True:
 client, addr = server.accept()
 oke = Thread(target=handler, args=[client,])
 oke.start()
