[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TM4C1294 LWIP Usage
From: |
Lee |
Subject: |
Re: [lwip-users] TM4C1294 LWIP Usage |
Date: |
Sun, 21 Dec 2014 18:18:01 -0700 (MST) |
Hi Noam,
I did manage to get it working.
#include "tcp_tx.h"
#include <stdint.h>
#include "lwip/debug.h"
#include "lwip/stats.h"
static err_t tx_sent(void *arg, struct tcp_pcb *pcb, u16_t len)
{
LWIP_UNUSED_ARG(len);
LWIP_UNUSED_ARG( arg );
tcp_write( pcb, data_buffer,1024, 0 );
return ERR_OK;
}
static void close_conn (struct tcp_pcb *pcb )
{
tcp_arg(pcb, NULL);
tcp_sent(pcb, NULL);
tcp_close(pcb);
}
static err_t tx_accept(void *arg, struct tcp_pcb *pcb, err_t err )
{
LWIP_UNUSED_ARG( arg );
LWIP_UNUSED_ARG( err );
tcp_setprio( pcb, TCP_PRIO_MIN );
tcp_err( pcb, NULL );
tcp_write( pcb, data_buffer,1024, 0 );
tcp_sent(pcb,tx_sent);
return ERR_OK;
}
void tcp_initialize( void )
{
struct tcp_pcb *tcp_pcb;
tcp_pcb = tcp_new();
tcp_bind(tcp_pcb, IP_ADDR_ANY, 1234);
tcp_pcb = tcp_listen( tcp_pcb );
tcp_accept( tcp_pcb, tx_accept );
}
It doesn't work without an initial tx_write in the accept function for some
reason. Thanks for your help. I'll now start looking at how much data this
will throughput but at the moment its very slow, partially due to my PC
clent taking 0.2S to Ack.
Lee.
--
View this message in context:
http://lwip.100.n7.nabble.com/TM4C1294-LWIP-Usage-tp23623p23641.html
Sent from the lwip-users mailing list archive at Nabble.com.
- Re: [lwip-users] TM4C1294 LWIP Usage, (continued)
- Re: [lwip-users] TM4C1294 LWIP Usage, Lee, 2014/12/18
- Re: [lwip-users] TM4C1294 LWIP Usage, Noam weissman, 2014/12/18
- Re: [lwip-users] TM4C1294 LWIP Usage, address@hidden, 2014/12/18
- Re: [lwip-users] TM4C1294 LWIP Usage, Lee, 2014/12/18
- Re: [lwip-users] TM4C1294 LWIP Usage, Martin Haupt, 2014/12/19
- Re: [lwip-users] TM4C1294 LWIP Usage, Lee Noack, 2014/12/18
- Re: [lwip-users] TM4C1294 LWIP Usage, Lee, 2014/12/19
- Re: [lwip-users] TM4C1294 LWIP Usage, Noam weissman, 2014/12/20
- Re: [lwip-users] TM4C1294 LWIP Usage, Paul Webber, 2014/12/20
- Re: [lwip-users] TM4C1294 LWIP Usage, Noam weissman, 2014/12/21
- Re: [lwip-users] TM4C1294 LWIP Usage,
Lee <=