* get an IP for a client * @param num uint8_t client id * @return IPAddress */
| 428 | * @return IPAddress |
| 429 | */ |
| 430 | IPAddress WebSocketsServer::remoteIP(uint8_t num) { |
| 431 | if(num < WEBSOCKETS_SERVER_CLIENT_MAX) { |
| 432 | WSclient_t * client = &_clients[num]; |
| 433 | if(clientIsConnected(client)) { |
| 434 | return client->tcp->remoteIP(); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | return IPAddress(); |
| 439 | } |
| 440 | #endif |
| 441 | |
| 442 | //################################################################################# |
no outgoing calls
no test coverage detected