Moved ip65_process directly to data processing.

Now that we process incoming data from the main loop - and use 'buf' both for incoming and outgoing data we should of course make sure that we never trash the incoming data with outgoing data.
This commit is contained in:
Oliver Schmidt 2017-11-07 22:57:15 +01:00
parent d059cf858a
commit 7af0dcd1fa
2 changed files with 6 additions and 4 deletions

View File

@ -73,8 +73,6 @@ void main(void)
printf("(T)CP or e(X)it\n");
do
{
ip65_process();
if (kbhit())
{
key = cgetc();
@ -101,6 +99,8 @@ void main(void)
}
}
ip65_process();
if (len == -1)
{
printf("Disconnect\n");
@ -113,6 +113,7 @@ void main(void)
if ((i % 11) == 0)
{
ip65_process();
printf("\n$%04X:", i);
}
printf(" %02X", buf[i]);

View File

@ -72,8 +72,6 @@ void main(void)
printf("(U)DP or e(X)it\n");
do
{
ip65_process();
if (kbhit())
{
key = cgetc();
@ -100,6 +98,8 @@ void main(void)
}
}
ip65_process();
if (len)
{
printf("Recv Len %u From %s", len, dotted_quad(src));
@ -108,6 +108,7 @@ void main(void)
if ((i % 11) == 0)
{
ip65_process();
printf("\n$%04X:", i);
}
printf(" %02X", buf[i]);