public Main(string ip, int port, string name, Socket server)
        {
            InitializeComponent();
            label6.Enabled = false;
            p           = port;
            s_ip        = ip;
            u           = name;
            this.server = server;
            byte[] onlineUsers = SocketHelp.ReceiveVarData(server);
            String onlin       = ASCIIEncoding.ASCII.GetString(onlineUsers);

            if (onlin.IndexOf(",") != -1)
            {
                String[] users = onlin.Split(',');
                foreach (var item in users)
                {
                    listBox2.Items.Add(item);
                }
            }
            else
            {
                listBox2.Items.Add(onlin);
            }
            Thread thread = new Thread(new ThreadStart(RecieveMessage));

            thread.Start();
        }
        public void RecieveMessage()
        {
            while (true)
            {
                try
                {
                    byte[] message = SocketHelp.ReceiveVarData(server);
                    String msg     = ASCIIEncoding.ASCII.GetString(message);
                    if (msg.IndexOf("Leaving") != -1)
                    {
                        String[] msgArr = msg.Split(' ');
                        listBox2.Invoke(new MethodInvoker(delegate { listBox2.Items.Remove(msgArr[0]); }));
                    }
                    else if (msg.IndexOf("Joined") != -1)
                    {
                        String[] msgArr = msg.Split(' ');
                        listBox2.Invoke(new MethodInvoker(delegate { listBox2.Items.Add(msgArr[0]); }));
                    }
                    else
                    {
                        listBox1.Invoke(new MethodInvoker(delegate { listBox1.Items.Add(msg); }));
                    }
                }
                catch (Exception)
                {
                }

                //listBox1.Items.Add(ASCIIEncoding.ASCII.GetString(message));
            }
        }