question on "write" (send) function
Posted: Mon Nov 28, 2016 11:40 am
Hi everybody,
I'm trying to send some data to a server using function "write" ("send"). In particular I receive data string from uart0 and then I send to the server.
The server waits for a EOL (in my case I send a '\n' at the end of the string) in order to parse the received string.
I noted a problem for my application: the write (or send) function adds an EOL to the end of the data string. In pratice if I send just one character, then the server receive also a EOL.This is not how it should work.
For example if I emulate the same using Putty (as a TCP client) until I send a "\n" or "\r" the server doesn't parse the string, while using the "write" or "send" function it does.
I have tried to explore the lwip components folder and some of its file (sockets.c, api_lib.c..) but I can't find where an EOL is attached.
Is it possible to avoid this?
Thank you.
I'm trying to send some data to a server using function "write" ("send"). In particular I receive data string from uart0 and then I send to the server.
The server waits for a EOL (in my case I send a '\n' at the end of the string) in order to parse the received string.
I noted a problem for my application: the write (or send) function adds an EOL to the end of the data string. In pratice if I send just one character, then the server receive also a EOL.This is not how it should work.
For example if I emulate the same using Putty (as a TCP client) until I send a "\n" or "\r" the server doesn't parse the string, while using the "write" or "send" function it does.
I have tried to explore the lwip components folder and some of its file (sockets.c, api_lib.c..) but I can't find where an EOL is attached.
Is it possible to avoid this?
Thank you.