VgaGames4 - network man-pages

[.. upper level ..]

vg4->nw->is_connected()

Return whether client is still connected.

SYNTAX
VG_BOOL vg4->nw->is_connected(int clnr)

FUNCTION PARAMETERS
clnr Client-number

RETURN VALUE
Returns boolean: - VG_TRUE: Yes - VG_FALSE: No

DESCRIPTION
Return whether client is still connected. This function uses the last known state received with vg4->nw->update().

EXAMPLE
/* iterate over all clients */
int icl, clmax;

clmax = vg4->nw->numberofclients(NULL);

for (icl = 1; icl <= clmax; icl++) {
  if (!vg4->nw->is_connected(icl)) { continue; }  /* not connected */
  /* use client with client-number icl */
}

SEE ALSO
vg4->nw->connect()