[lwip-users] Raw lwIP server write issue

2015-11-05 Thread Amit Ashara
Hello All, I am using Raw lwIP 1.4.1 on a microcontroller. Since the requirement is to have acknowledged transfer between two devices, I created a server and client model. However I ran into an issue. When a connection is established between the server and the client, I can use the tcp_write on t

Re: [lwip-users] Raw lwIP server write issue

2015-11-05 Thread Valery Ushakov
Amit Ashara wrote: > When a connection is established between the server and the client, > I can use the tcp_write on the client side to send data in my > application code. However the same on the server side is not > possible. The pcb that has been used for the server only contains > the serve

Re: [lwip-users] Raw lwIP server write issue

2015-11-05 Thread Amit Ashara
Hello Uwe, I have the call back for accept set as follows. In the main application, I call echo_accept. server_tpcb = tcp_new(); ui32Err = tcp_bind(server_tpcb, (ip_addr_t *)&g_ui32IPAddress, NODE_TCP_SERVER_PORT); UARTprintf("\n%d",ui32Err);

Re: [lwip-users] Raw lwIP server write issue

2015-11-07 Thread Valery Ushakov
Amit Ashara wrote: > Do you mean that instead of using pcb I should have another tcp_pcb e,g, > newpcb that is assigned from the pcb in the call back. > > struct tcp_pcb *newpcb; > > static err_t echo_accept(void *arg, struct tcp_pcb *pcb, err_t err) > > { > LWIP_UNUSED_ARG(arg); >

Re: [lwip-users] Raw lwIP server write issue

2015-11-07 Thread Amit Ashara
Thanks Uwe. On Fri, Nov 6, 2015 at 5:17 PM, Valery Ushakov wrote: > Amit Ashara wrote: > > > Do you mean that instead of using pcb I should have another tcp_pcb e,g, > > newpcb that is assigned from the pcb in the call back. > > > > struct tcp_pcb *newpcb; > > > > static err_t echo_accept(void