New TcpClient timeout?

Options
lazalong
edited June 2012 in Photon Server
Hey

I updgraded to the latest release (server v3-0-24-3243-RC9 and Photon-Unity3D_v3-0-1-11).

But now I have a TCP timeout when using a tcp console I use to control my game.

The code is based on the old LoadBalancing TestClient which uses a TcpClient - not the new one using a fiber.

Did you introduce a change that causes a timeout after 5 sec?
Do I need now to make an infinite ping loop to keep the connection alife?
This works but isn't there something in-build in TcpClient to keep the connection alife?

Or a fiber but how to combine it with the tcpclient?

Can I set the tcp timeout via a method? Or can I only do that via the config file?
(Once authenticated the admin console shouldn't need to send a ping very often).


Btw why did you remove the TcpClient sample?


Thanks

Comments

  • Tobias
    Options
    > Did you introduce a change that causes a timeout after 5 sec?
    That was in there all the time. Otherwise tcp connections would never timeout unless you write something on the socket.
    So, yes, a ping is needed. The client lib takes care of that, if you use anything else, you have to ping or similar.

    TcpClient? This is in System.Net.Sockets, right? I doubt it will ping by itself.

    > Or a fiber but how to combine it with the tcpclient?
    A fiber is there to execute messages serially. You could schedule a message to execute regularly and when that's done, write something on the TcpClient?

    > Can I set the tcp timeout via a method?
    In PhotonServer.config, per TCPListener. You could setup an extra listener on another port and change the "InactivityTimeout".

    > Btw why did you remove the TcpClient sample?
    I have no clue. I guess because you could use our client for the same tasks and we do support those.
    We now also have server-to-server communication with our protocols and it makes sense for us to use less other techniques when ours fits in.

    Hope this helps. I'm not the server guy around here ;)