#StackBounty: #port #localhost #c# #ubuntu-unity C# Unity Client SocketException: Connection refused

Bounty: 100

I got referred here from StackOverflow.

When I try to run an application on Unity, I get an error (SocketException: Connection refused) on the line:

using (TcpClient tcpClient = new TcpClient("", port_number))

Then, I tried to look for all opened port in network utility on Mac, and when I telnet port_number on terminal, it was able to connect, but when I try to run the code on Unity, it crashes now instead of throwing that error mentioned in the title.

I don’t think it is a code issue because my teammates are able to run the same program successfully on their machine.

I am using Unity 2019.2.5f1, MacOS Mojave version 10.14.6, and I disabled my firewalls and uninstalled all my VPNs.

I am looking for possible cause of my issue here and what to research to debug this.

Thank you.

Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.