AnsweredAssumed Answered

Ethernet Echo Server

Question asked by aydogdu.ali on Nov 10, 2016
Latest reply on Nov 11, 2016 by ForumSTM32.ForumSTM3
Hi,

I have a problem about ethernet echo server.Sended data from client can be readed but with echo. Besides, I want to send data to client.Because of this;

uint8_t buffer[8];
          
           buffer[0] = (0xFF000000 & (uint32_t)(100)) >> 24;
     buffer[1] = (0x00FF0000 & (uint32_t)(100)) >> 16;
     buffer[2] = (0x0000FF00 & (uint32_t)(100)) >> 8;
     buffer[3] = (0x000000FF & (uint32_t)(100));
          
     buffer[4] = (0xFF000000 & (uint32_t)(300)) >> 24;
     buffer[5] = (0x00FF0000 & (uint32_t)(300)) >> 16;
     buffer[6] = (0x0000FF00 & (uint32_t)(300)) >> 8;
     buffer[7] = (0x000000FF & (uint32_t)(300));
                    
          
    /* enqueue data for transmission */
     wr_err = tcp_write(tpcb, ptr->payload, ptr->len, 1);
     wr_err = tcp_write(tpcb, &buffer, 8, 1);

This function is written in static void tcp_echoserver_send().But with this way , data is made echo.How can be closed echo ?

Outcomes