i have read this post but it's only for sending, what about receive data from server
@PerryBebbington can you help me?
i have read this post but it's only for sending, what about receive data from server
@PerryBebbington can you help me?
I'm not sure what you don't understand. The examples show a client connecting to the server, sending some data to the server, the server receives it then sends some data back, which the client receives. There is both sending and receiving involved at both sides, so to say there is nothing about receiving data from the server is not the case.
Please be more specific about the problems you are having with what you are trying to do.
Also, as this is a programming question I have moved your question to the programming section of the forum.
my fault, i mean that i don't know what line of the code do the task receive data from the server
The code in the client that receives the data is:
void printNewData() {
uint8_t i;
for (i = 0; i < NUM_CLIENTS; ++i) {
if (Clients[i].RxDataValid) {
Clients[i].RxDataValid = false;
Serial.print("New data from client ");
Serial.print(i);
Serial.print(" ");
Serial.println(Clients[i].RxData);
}
}
}
The data is printed with:
Serial.println(Clients[i].RxData);
However, without wishing to be rude, if this is not obvious to you I think you probably have a lot to learn about basic programming in C++ before the information on this tutorial will be of use to you.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.