[][src]Function libeyelink_sys::eyelink_poll_remotes

pub unsafe extern "C" fn eyelink_poll_remotes() -> INT16

@ingroup init_eyelink Asks all non-tracker computers (with EyeLink software running) on the network to send their names and node address.

@return \c OK_RESULT if successful, otherwise link error. @return \c LINK_TERMINATED_RESULT if link error. @return \c -1 if broadcast option is not available.

\b Example:

\code

#include 

ELINKADDR listener_address;  // Address of listener application

int check_for_listener(void)
{
int i, n;
ELINKNODE node;  // This will hold application name and address

eyelink_poll_remotes(); // Polls network for EyeLink applications
pump_delay(500);        // Gives applications time to respond

n = eyelink_poll_responses();  // How many responses?
for(i = 1; i<= n; i++)
{
if(eyelink_get_node(i, &node) < 0)
return -1;  // error: no such data

if(!_stricmp(node.name, "comm_listener"))
{
memcpy(listener_address, node.addr, sizeof(ELINKADDR));

eyelink_node_send(listener_address, "NAME comm_simple", 40);

...
...

return 0;   // all communication checks out
}
}
return -1;    // no listener node found
}
\endcode

\sa \c eyelink_poll_responses() and \c eyelink_poll_trackers()