Exemplo n.º 1
0
    public void onUpdate(float delta)
    {
        ReceiveAllTime();
        switch (state)
        {
        case BGSocketState.disconnected:

            if (connected)
            {
                FrameDelayCall.remove(checkcall);

                if (socket != null)
                {
                    socket.Disconnect(true);
                }
                //socket=null;
                //socketReceiveHandler=null;
                //socketReceiveThread=null;
                bgISocket.scoketDiconnected();
            }
            connected = false;


            break;
        }
        state = BGSocketState.idle;
    }
Exemplo n.º 2
0
 public void checkConnected()
 {
     if (Connected)
     {
         checkcall = null;
         bgISocket.socketConnected();
     }
     else
     {
         checkcall = FrameDelayCall.Add(checkConnected, 5, bgISocket as MonoBehaviour, true);
     }
 }