protected virtual void OnRaiseClientConnectedEvent(ClientConnectedEventsArgs e)
        {
            EventHandler <ClientConnectedEventsArgs> handler = RaiseClientConnectedEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        //private async void TakeCareOfTCPClient(TcpClient paramClient)
        //{
        //    NetworkStream stream = null;
        //    StreamReader reader = null;

        //    try
        //    {
        //        stream = paramClient.GetStream();
        //        reader = new StreamReader(stream);

        //        char[] buff = new char[64];

        //        while(KeepRunning)
        //        {
        //            Debug.WriteLine("*** Ready to read");
        //            int nRet=await reader.ReadAsync(buff,0,buff.Length);
        //            System.Diagnostics.Debug.WriteLine("Returned: "+nRet);

        //            if(nRet==0)
        //            {
        //                RemoveveClient(paramClient);
        //                Debug.WriteLine("Socket disonnected");
        //                break;
        //            }

        //            string receivedText = new string(buff);

        //            Debug.WriteLine("*** RECEIVED: "+receivedText);

        //            OnRaiseTextReceivedEvent(new TextReceivedEventsArgs(paramClient.Client.RemoteEndPoint.ToString(),receivedText));
        //            Array.Clear(buff,0,buff.Length);

        //        }
        //    }
        //    catch(Exception ex)
        //    {
        //        RemoveveClient(paramClient);
        //        Debug.WriteLine(ex.ToString());
        //    }

        //}


        private async void TakeCareOfTCPClient(TcpClient paramClient)
        {
            NetworkStream stream = null;
            StreamReader  reader = null;

            try
            {
                stream = paramClient.GetStream();
                reader = new StreamReader(stream);

                byte[] buff = new byte[1024];

                while (KeepRunning)
                {
                    Debug.WriteLine("*** Ready to read");
                    int nRet = await stream.ReadAsync(buff, 0, buff.Length);

                    System.Diagnostics.Debug.WriteLine("Returned: " + nRet);

                    if (nRet == 0)
                    {
                        RemoveClient(paramClient);
                        Debug.WriteLine("Socket disonnected");
                        break;
                    }

                    SocketDataTransfer socketDataTransfer = ByteArrayToObject(buff, nRet);
                    if (socketDataTransfer.command == Globals.cmd_update_users_list)
                    {
                        connected_user_to_socket_map[socketDataTransfer.user_name] = paramClient;

                        string UserIPAddress, UserPort, UserName;
                        ClientConnectedEventsArgs eaClientConnected;
                        UserIPAddress = ((IPEndPoint)paramClient.Client.RemoteEndPoint).Address.ToString();
                        UserPort      = ((IPEndPoint)paramClient.Client.RemoteEndPoint).Port.ToString();
                        UserName      = socketDataTransfer.user_name;

                        //eaClientConnected = new ClientConnectedEventsArgs(paramClient.Client.RemoteEndPoint.ToString());
                        eaClientConnected = new ClientConnectedEventsArgs(UserIPAddress, UserPort, UserName);
                        OnRaiseClientConnectedEvent(eaClientConnected);
                    }
                    OnRaiseSocketDataTransferEvent(new SocketDataTransferEventsArgs(socketDataTransfer));
                    Array.Clear(buff, 0, buff.Length);
                }
            }
            catch (Exception ex)
            {
                RemoveClient(paramClient);
                Debug.WriteLine(ex.ToString());
            }
        }