Guys so here is another thing.
private void Form1_Load(object sender, EventArgs e)
{
sck.Connect("127.0.0.1", 8080);
int s = sck.Send(Encoding.Default.GetBytes("A" + "~" + "B" + "~" + "C" + "~" + "D"));
}
is there a way to send them separately to the server? and also receive them and adding them separately into the listView without splitting? Below the clientdata is the whole integer from void Load Form
void client_Received(Client sender, byte[] data)
{
Invoke((MethodInvoker)delegate
{
for (int i = 0; i < listView1.Items.Count; i++)
{
Client client = listView1.Items[i].Tag as Client;
if (client.ID == sender.ID)
{
clientdata = Encoding.Default.GetString(data); ;
string[] str = clientdata.Split('~');
listView1.Items[i].SubItems[2].Text = str[0];
listView1.Items[i].SubItems[3].Text = str[1];
listView1.Items[i].SubItems[4].Text = str[2];
listView1.Items[i].SubItems[5].Text = str[3];
break;
}
}
});
}
i want to change this void something Like:
void client_Received(Client sender, byte[] A, byte[] B, byte[] C, byte[] D)
{
}