P
Piotrekk
Hi
I have a question.
Why file, that i wanna send is sent only partially.
When i wanna send 4xx kb only 266 is sent.
Thanks for your help
PK
Here is the code:
if (Client.Connected)
{
String line = null;
file = new StreamReader(sfName);
fileLength = file.BaseStream.Length;
Client.Client.Send(fName, 0, fName.Length,
SocketFlags.None);
mylegth = fileLength / 100;
long i = 0;
this.smoothprogressBar1.Value = 0;
while ((line = file.ReadLine()) != null)
{
i +=
Client.Client.Send(ASCIIEncoding.ASCII.GetBytes(line));
this.smoothprogressBar1.Value = (int) ((i *
100)/ fileLength);
}
file.Close();
Client.Close();
}
I have a question.
Why file, that i wanna send is sent only partially.
When i wanna send 4xx kb only 266 is sent.
Thanks for your help
PK
Here is the code:
if (Client.Connected)
{
String line = null;
file = new StreamReader(sfName);
fileLength = file.BaseStream.Length;
Client.Client.Send(fName, 0, fName.Length,
SocketFlags.None);
mylegth = fileLength / 100;
long i = 0;
this.smoothprogressBar1.Value = 0;
while ((line = file.ReadLine()) != null)
{
i +=
Client.Client.Send(ASCIIEncoding.ASCII.GetBytes(line));
this.smoothprogressBar1.Value = (int) ((i *
100)/ fileLength);
}
file.Close();
Client.Close();
}