[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] [lwip]more on pcb->queuelen
From: |
address@hidden |
Subject: |
[lwip-users] [lwip]more on pcb->queuelen |
Date: |
Thu, 09 Jan 2003 01:29:58 -0000 |
Hi,
I would like to describe better the problem I have with pcb->queuelen.
My application produce fake data (100bytes) every 50ms, fired by a flag
set by a 50ms timer. It's 2000 bytes per second.
With a boolean I can decide to produce data without trigger, to measure
the maximum data rate.
Here the code:
void
datarate_deamon(void)
{
char puBuffer[1024];
u16_t i;
err_t err;
if (datarate_pcb != NULL)
{
if ((uiDatarateTimer==0) || bContinuos)
{
uiDatarateTimer = uiInterval / TIMER1_OVERFLOW_RATE;
for(i=1; i<=uiDatalenght; i++)
{
puBuffer[i] = (char)(i % 255);
}
i = tcp_sndbuf(datarate_pcb);
if (i >= uiDatalenght)
{
err = tcp_write(datarate_pcb, puBuffer, uiDatalenght, 1);
if (err == ERR_OK)
{
DEBUGF(DATARATE_DEBUG, ("datarate data sent\n"));
//tcp_output(datarate_pcb);
}
else
{
DEBUGF(DATARATE_DEBUG, ("datarate data sending problem!\n"));
}
}
}
}
}
lwIP is running in a single thread, 8051 platform, CS8900A. For some
reasons the system is running very slow, so that data rate is very hard
to maintain and stresses the stack/memory management.
I run a VB application on a Windows PC that connect to this server and
measure the number of bytes per second. Very simply.
Is there any problem if I call tcp_output from the application? My idea
is to output immediately the data just enqueue.
Thanks in advance and please be patient,
Andrea
[This message was sent through the lwip discussion list.]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] [lwip]more on pcb->queuelen,
address@hidden <=