Added flags to tcp_write

This commit is contained in:
Roelandts_Gert
2023-11-27 15:58:22 +01:00
committed by Sander Speetjens
parent e924f2b82d
commit 3cfb22f590

View File

@@ -57,6 +57,7 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t
"listImages: laat een lijst zien van de mogelijke afbeeldingen\r\n"
"setImage : veranderd te afbeelding (naam_afbeelding)\r\n"
"exit : sluit de verbinding\r\n", 354, TCP_WRITE_FLAG_COPY | TCP_WRITE_FLAG_MORE);
tcp_output(pcb);
} else if (!strncmp(tcp_buffer, "text ", 5)) {
for (i = 0; i < len - 4; i++) {
text[i] = tcp_buffer[i + 5];
@@ -167,7 +168,7 @@ static err_t tcp_cmd_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t
tcp_cmd_close(pcb);
}
if (strncmp(tcp_buffer, "\r\n", 2) != 0) {
tcp_write(pcb, "User: ", 6, 0);
tcp_write(pcb, "User: ", 6, TCP_WRITE_FLAG_COPY | TCP_WRITE_FLAG_MORE);
}
return ERR_OK;