How do i send messages in p2p?

i wanted to make a texting app
and i am having troubles setting it up

Hi, could you give us some more information, I can’t really help you as I don’t know what you need.

for some reason when i connect to the other client, it dosen’t connect properly. it connects for a second or two and then disconnects

this is my code:

nevermind, its fixed

@gooseygames Can you tell me how you fixed it please? There may be people in the future with a similar issue.