public void CloseClientConnection()
    {
        try
        {
            MemoryStream memoryStream_ReceivedData = new MemoryStream(byteArray_ReceivedData, 4, byteArray_ReceivedData.Length - 4);

            ulong ulong_ClientUIN = CommonMethods.ReadUInt64FromStream(memoryStream_ReceivedData);

            if (ConnectedClient.IsNecesseryUINConnected((ulong)ulong_ClientUIN) == true)
            {
                ConnectedClient.GetClientByUIN(ulong_ClientUIN).Disconnect(7);
            }
        }

        catch
        {
        }
    }
    public void InterconnectionProcessRequest() //call by client
    {
        try
        {
            MemoryStream memoryStream_ReceivedData = new MemoryStream(byteArray_ReceivedData, 4, byteArray_ReceivedData.Length - 4);

            ulong ulong_RequestServerUIN = CommonMethods.ReadUInt64FromStream(memoryStream_ReceivedData);

            int  int_WaitForServer  = CommonMethods.ReadIntFromStream(memoryStream_ReceivedData);
            bool bool_WaitForServer = true;

            if (int_WaitForServer == 1)
            {
                bool_WaitForServer = true;
            }
            else
            {
                bool_WaitForServer = false;
            }

            if (ConnectedClient.IsNecesseryUINConnected(this.NecessaryBaseChannelObject.UIN) == true)
            {
                ConnectedClient connectedClient_obj = ConnectedClient.GetClientByUIN(this.NecessaryBaseChannelObject.UIN); //!! было (ulong_ClientUIN)

                connectedClient_obj.WaitForServer = bool_WaitForServer;

                ConnectedClient.AppliedClientChannel appliedClientChannel_obj = connectedClient_obj.GetNecesseryAppliedClientChannelByServerUIN(ulong_RequestServerUIN);

                connectedClient_obj.InterconnectionProcessRequest(appliedClientChannel_obj, ulong_RequestServerUIN);
            }
        }

        catch (Exception exception)
        {
            MessageBox.Show(exception.Message + " -- " + exception.StackTrace);
        }

        finally
        {
        }
    }
    public void InitInterconnectionProcess() //called by server
    {
        try
        {
            MemoryStream memoryStream_ReceivedData = new MemoryStream(byteArray_ReceivedData, 4, byteArray_ReceivedData.Length - 4);

            ulong ulong_ClientUIN = CommonMethods.ReadUInt64FromStream(memoryStream_ReceivedData);

            if (ConnectedClient.IsNecesseryUINConnected((ulong)ulong_ClientUIN) == true)
            {
                NetworkAction.InterConnectedObjects interConnectedObject_obj = new NetworkAction.InterConnectedObjects();

                interConnectedObject_obj.AppliedServerChannel = ConnectedServer.GetServerByUIN(this.NecessaryBaseChannelObject.UIN).GetNecesseryAppliedServerChannelByClientUIN(ulong_ClientUIN);
                interConnectedObject_obj.AppliedClientChannel = ConnectedClient.GetClientByUIN(ulong_ClientUIN).GetNecesseryAppliedClientChannelByServerUIN(this.NecessaryBaseChannelObject.UIN);

                interConnectedObject_obj.AppliedClientChannel.InterconnectedObject = interConnectedObject_obj.AppliedServerChannel.ChannelOwner; // если клиент ждал сервера то этот объект  InterconnectedObject назначается только здесь!

                new Thread(new ParameterizedThreadStart(new NetworkAction().ClientInterConnectionProcessReceiveCycle)).Start(interConnectedObject_obj);
                new Thread(new ParameterizedThreadStart(new NetworkAction().ServerInterConnectionProcessReceiveCycle)).Start(interConnectedObject_obj);

                CommonNetworkEvents.NewInterConnectionEvent(interConnectedObject_obj.AppliedServerChannel, interConnectedObject_obj.AppliedClientChannel);

                SendNewInterConnectionEventNotify(interConnectedObject_obj.AppliedServerChannel.ChannelOwner.SystemChannel.BaseChannel, interConnectedObject_obj.AppliedServerChannel.ChannelOwner.UIN);
                SendNewInterConnectionEventNotify(interConnectedObject_obj.AppliedClientChannel.ChannelOwner.SystemChannel.BaseChannel, interConnectedObject_obj.AppliedClientChannel.ChannelOwner.UIN);
            }

            memoryStream_ReceivedData.Close();
        }

        catch
        {
        }

        finally
        {
        }
    }