Beispiel #1
0
    public void Update()
    {
        if (!Socket_.IsWorking_)
        {
            return;
        }

        Socket_.DoOutgoing();
        Socket_.DoIncoming();

        if (Socket_.IncomingBuffer.Length != 0)
        {
            while (dispatch())
            {
            }
            Socket_.IncomingBuffer.Crunch();
        }


        if (Socket_.LastError != 0)
        {
            if (OnSocketError != null)
            {
                OnSocketError(Socket_.LastError);
            }
            Socket_.LastError = 0;
        }
    }