question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WatsonTCP Client disconnects instantly.

See original GitHub issue

Similar to #62 but have followed instructions on that issue and still have the problem.

OS: Windows 10 LTS Screenshots: image

Our code:

// Start the server:
public void Start(ushort port = 52512, string name = "My Server", string password = "", ushort maxplayers = 10)
        {
            Password = password;
            MaxPlayers = maxplayers;
            Port = port;
            server = new WatsonTcpServer(null, Port);
            server.ClientConnected += ClientConnected;
            server.ClientDisconnected += ClientDisconnected;
            server.MessageReceived += MessageReceived;
            server.StreamReceived += StreamRecieved;
            server.SyncRequestReceived = SyncRequestReceived;
            server.Start();
            Logging.Info($"[Server] Server started.");

            Logging.Info("[Server] Load/Create ServerData");
            serverdata = new ServerData(name);
        }
// Connect to the server:
public void Connect(string ip, ushort port = 52512, string password = "", Helpers.UserRole userRole = Helpers.UserRole.Client)
        {
            client = new WatsonTcpClient(ip, port);
            client.ServerConnected += ServerConnected;
            client.ServerDisconnected += ServerDisconnected;
            client.MessageReceived += MessageReceived;
            client.SyncRequestReceived = SyncRequestReceived;
            client.Start();
            if (client.Connected)
                Login(password);
            else
                Logging.Warn("[Client] Couldn't connect to the server!");
        }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Aug 13, 2020

It seems watsonTCP doesn’t support 3.5, a shit ton of errors showed up when I opened watsonTCP in 3.5 targeted environment.

No problem, we switched to Telepathy which has better Unity support.

1reaction
jchristncommented, Aug 12, 2020

Did you clone and retarget to .NET Framework 3.5?
image

Read more comments on GitHub >

github_iconTop Results From Across the Web

In this project the client will connect but then is immediately ...
Client is somehow being immediately disposed upon connect. There's no exception thrown and caught from within DataReceiver, so it must be a ...
Read more >
WatsonTcp is the easiest way to build TCP-based clients ...
Disconnecting Idle Clients. If you wish to have WatsonTcpServer automatically disconnect clients that have been idle for a period of time, set WatsonTcpServer....
Read more >
C# Tcp Server client Disconnecting problems
When a client disconnects and detected properly you can do all that is needed to make it work properly, like removing it from...
Read more >
颜乾/WatsonTcp
Disconnecting Idle Clients. If you wish to have WatsonTcpServer automatically disconnect clients that have been idle for a period of time, set WatsonTcpServer....
Read more >
Client disconnects immediately after connection to Node js ...
I am trying to get the client to connect to the server and maintain the connection without closure. This is all hosted in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found