Added flags to tcp_write
This commit is contained in:
@@ -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"
|
"listImages: laat een lijst zien van de mogelijke afbeeldingen\r\n"
|
||||||
"setImage : veranderd te afbeelding (naam_afbeelding)\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);
|
"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)) {
|
} else if (!strncmp(tcp_buffer, "text ", 5)) {
|
||||||
for (i = 0; i < len - 4; i++) {
|
for (i = 0; i < len - 4; i++) {
|
||||||
text[i] = tcp_buffer[i + 5];
|
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);
|
tcp_cmd_close(pcb);
|
||||||
}
|
}
|
||||||
if (strncmp(tcp_buffer, "\r\n", 2) != 0) {
|
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;
|
return ERR_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user