import socket
from tkinter import*
def send(listbox,entry):
    message=entry.get()
    listbox.insert('end',"Server: "+message)
    entry.delete(0,END)
    client.send(bytes(message, "utf-8"))



def recieve(listbox):
    message_from_client=client.recv(50)
    listbox.insert('end',"Client: "+message_from_client.decode("utf-8"))


root=Tk()
entry=Entry()
entry.pack(side=BOTTOM)
listbox=Listbox(root)
listbox.pack()
button=Button(root,text="send",command=lambda:send(listbox,entry))
button.pack(side=BOTTOM)
rbutton=Button(root,text="recieve",command=lambda:recieve(listbox))
rbutton.pack(side=BOTTOM)
root.title("Server")


s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
HOSt_NAME=socket.gethostname()
PORT=12345
s.bind((HOSt_NAME,PORT))
s.listen(4)
client,address=s.accept()
root.mainloop()


    # print("Client:"+message_from_client.decode("utf-8"))
52c6e943cd053d1e7f9fa0b8c84636d54d714b1e
<mask token>


def send(listbox, entry):
    message = entry.get()
    listbox.insert('end', 'Server: ' + message)
    entry.delete(0, END)
    client.send(bytes(message, 'utf-8'))


def recieve(listbox):
    message_from_client = client.recv(50)
    listbox.insert('end', 'Client: ' + message_from_client.decode('utf-8'))


<mask token>

<mask token>


def send(listbox, entry):
    message = entry.get()
    listbox.insert('end', 'Server: ' + message)
    entry.delete(0, END)
    client.send(bytes(message, 'utf-8'))


def recieve(listbox):
    message_from_client = client.recv(50)
    listbox.insert('end', 'Client: ' + message_from_client.decode('utf-8'))


<mask token>
entry.pack(side=BOTTOM)
<mask token>
listbox.pack()
<mask token>
button.pack(side=BOTTOM)
<mask token>
rbutton.pack(side=BOTTOM)
root.title('Server')
<mask token>
s.bind((HOSt_NAME, PORT))
s.listen(4)
<mask token>
root.mainloop()

<mask token>


def send(listbox, entry):
    message = entry.get()
    listbox.insert('end', 'Server: ' + message)
    entry.delete(0, END)
    client.send(bytes(message, 'utf-8'))


def recieve(listbox):
    message_from_client = client.recv(50)
    listbox.insert('end', 'Client: ' + message_from_client.decode('utf-8'))


root = Tk()
entry = Entry()
entry.pack(side=BOTTOM)
listbox = Listbox(root)
listbox.pack()
button = Button(root, text='send', command=lambda : send(listbox, entry))
button.pack(side=BOTTOM)
rbutton = Button(root, text='recieve', command=lambda : recieve(listbox))
rbutton.pack(side=BOTTOM)
root.title('Server')
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOSt_NAME = socket.gethostname()
PORT = 12345
s.bind((HOSt_NAME, PORT))
s.listen(4)
client, address = s.accept()
root.mainloop()

import socket
from tkinter import *


def send(listbox, entry):
    message = entry.get()
    listbox.insert('end', 'Server: ' + message)
    entry.delete(0, END)
    client.send(bytes(message, 'utf-8'))


def recieve(listbox):
    message_from_client = client.recv(50)
    listbox.insert('end', 'Client: ' + message_from_client.decode('utf-8'))


root = Tk()
entry = Entry()
entry.pack(side=BOTTOM)
listbox = Listbox(root)
listbox.pack()
button = Button(root, text='send', command=lambda : send(listbox, entry))
button.pack(side=BOTTOM)
rbutton = Button(root, text='recieve', command=lambda : recieve(listbox))
rbutton.pack(side=BOTTOM)
root.title('Server')
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOSt_NAME = socket.gethostname()
PORT = 12345
s.bind((HOSt_NAME, PORT))
s.listen(4)
client, address = s.accept()
root.mainloop()

import socket
from tkinter import*
def send(listbox,entry):
    message=entry.get()
    listbox.insert('end',"Server: "+message)
    entry.delete(0,END)
    client.send(bytes(message, "utf-8"))



def recieve(listbox):
    message_from_client=client.recv(50)
    listbox.insert('end',"Client: "+message_from_client.decode("utf-8"))


root=Tk()
entry=Entry()
entry.pack(side=BOTTOM)
listbox=Listbox(root)
listbox.pack()
button=Button(root,text="send",command=lambda:send(listbox,entry))
button.pack(side=BOTTOM)
rbutton=Button(root,text="recieve",command=lambda:recieve(listbox))
rbutton.pack(side=BOTTOM)
root.title("Server")


s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
HOSt_NAME=socket.gethostname()
PORT=12345
s.bind((HOSt_NAME,PORT))
s.listen(4)
client,address=s.accept()
root.mainloop()


    # print("Client:"+message_from_client.decode("utf-8"))