C
C#6d ago
Gunshot

✅ C# TCP connections Help

Hi i am trying to make a chat application P2P using TCP, and i make a initial connection to the listener and make a communication trade cancel the connection and then boot up a new client for a new connection and it keeps getting actively denied. i will provide code and output screen shots. Please help. I will also provide a timeline kind of thing for what is supposed to happen. Client- right how I understand it is that the my form Data_Input.cs sends a connection and sends the get request for the session info, the host receives this and handles and responds to it, with the session info, then the data input form closes its connection after it has made the new session, moving back to the homepage.cs which is where data input is created, the homepage now has the session loaded in form the information, the client opens the session and message window form opens up and attempts to connect to the same listener but currently that doesn't work for some reason. and then typing into the input box and clicking enter makes a new client and then sends the message over. Host - The host creates a new session and opens the session, the session detects that it is a host and then opens a listener waiting for a client, it receives the first client for the session and responds to it, however on the second connection I don't know if the listener is still going or not but the second message is not received. the commented out functions are methods i have tried but dont work. I need to sleep now I have spent too long on this but id appreciate any ideas on what is going on, thanks in advance
No description
No description
No description
No description
No description
No description
3 Replies
Gunshot
GunshotOP6d ago
I will try to respond as soon as i can if any clarifercation is needed
lycian
lycian6d ago
$code
MODiX
MODiX6d ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
Want results from more Discord servers?
Add your server