Class Discover

Class Documentation

class Discover

Public Types

typedef SocketLinux SocketType

Public Functions

Discover()

Initializes a socket ready for broadcasting requests.

NOTE: Exceptions are thrown in case of severe network errors.

~Discover()
void broadcastRequest()

Broadcasts a discovery command request.

bool getResponse(std::vector<DeviceInfo> &info, int timeout_per_socket = 1000)

Returns a discovery response. This method should be called until there is no further response.

Parameters:
  • info – Info object that will be filled if there is an available response.

  • timeout – Timeout in Milliseconds.

Returns:

True if there was a valid response. In this case, the info object contains valid information. False in case of a timeout.