© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•14mo ago•
3 replies
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
image.png
image.png
image.png
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Async TCP server with many connections
C#CC# / help
3y ago
TCP Help again...
C#CC# / help
14mo ago
✅ C# help
C#CC# / help
5mo ago