I would like to have a specific client disconnected with a server command.
from socket import *
meuHost = ''
minhaPort = 50007
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((meuHost, minhaPort))
sockobj.listen(5)
while True:
conexão, endereço = sockobj.accept()
print('Server conectado por', endereço)
while True:
data = conexão.recv(1024)
if not data: break
conexão.send(b'Eco=>' + data)
If there is this "Accept" attribute, is there any way to "Kick" or disconnect a client from my server?