-1

I have a small issue with ethernet server. I'd like to make Arduino server listening on port and catch connected devices but the problem is thats devices don't send anything first. just connecting and waiting for "welcome message" from the serwer. Unfortunately I con not use this command

EthernetClient client = server.available();

Do you have any idea how to get client instance/object without sanding any message from client.

Thanks

1 Answers1

1

server.available() should return only a client which has data waiting, otherwise you would get always the first client only.

You can use server.accept(). I returns a every client connection only once. See the AdvancedChatServer example.

Juraj
  • 3,490
  • 4
  • 18
  • 25