Hi, I would like to thank you all for your answers and more precisely Frederic 
Bernon. I was able to get a working code either using dhcp or not.Now, I had 
encountered another problem a few weeks ago about the maximum limit size that 
we can send on the Virtex II Pro port using EDK. For now, I'm focusing on 
sending files from the server because it will be the major application. I 
created a structure connection_state: First, we couldn t send more than around 
8000 bytes of data. This was fixed by changing the argument in the tcp_write 
function by choosingnot to copy before sending the data.After thinking about 
it, I guess that increasing the Memory heap would have also fixed it, right? 
Now, I'm facing another problem. When I send 20.000 bytes, it is working over 
this, it is not. One of my teammate tried and could send it to around 32.000 
bytes which seem more logical as the send buffer is limited to 32*1024*1024 
bytes.Howeve, when I tried to change the value in the lwipopt.h and look 
around. Whatever value we tried to put, it didn t take any effect when 
compiling.The value is still 32*1024*1024. Do you have any hints about this? 
Since we're working with video stream or uncompessed data image, the size of 
the files is rather big and being limitedthat much is not normal. Below, a 
sample of my code and send_data function: struct connection_state {  char 
*data;  u32_t left;};   void send_data(struct tcp_pcb *pcb, struct 
connection_state *cs){  u16_t len;  /* We cannot send more data than space 
available in the send buffer.*/  if(tcp_sndbuf(pcb) < (cs->left)) {    len = 
tcp_sndbuf(pcb);  }  else {     len = cs->left;  }       if(ERR_OK == 
tcp_write(pcb, cs->data, len, 0)) {  cs->data += len;  cs->left -= len;  }  
else if(ERR_MEM == tcp_write(pcb, cs->data, len, 0)) {    tcp_output(pcb);  } 
Many thanks again, Louis.
_________________________________________________________________
David Guetta a réuni les sons les plus connus de Messenger dans le Mix 
Messenger, le son de l’été ! Téléchargez-le gratuitement !
http://specials.divertissements.fr.msn.com/mixmessenger
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to