void GSendStr(const char *buf) { int len = buf ? strlen(buf) + 1 : 0; GDebug("Sending string %'s to %s\n", buf, who); GWrite(&len, sizeof(len)); GWrite(buf, len); }
void GSendArr( int len, const char *buf ) { GDebug( "Sending array %02[:*hhx to %s\n", len, buf, who ); GWrite( &len, sizeof(len) ); GWrite( buf, len ); }
static void GSendNStr( const char *buf, int len ) { int tlen = len + 1; GWrite( &tlen, sizeof(tlen) ); GWrite( buf, len ); GWrite( "", 1 ); }
static void GSendStr( const char *buf ) { if (buf) { int len = strlen( buf ) + 1; GWrite( &len, sizeof(len) ); GWrite( buf, len ); } else GWrite( &buf, sizeof(int)); }
bool Greeter::GSendArr(int len, const char *buf) { return GWrite(&len, sizeof(len)) && GWrite (buf, len); }
bool Greeter::GSendStr(const char *buf) { int len = buf ? ::strlen (buf) + 1 : 0; return GWrite(&len, sizeof(len)) && GWrite (buf, len); }
bool Greeter::GSendInt(int val) { return GWrite(&val, sizeof(val)); }
static void GSendArr( int len, const char *data ) { GWrite( &len, sizeof(len) ); GWrite( data, len ); }
static void GSendInt( int val ) { GWrite( &val, sizeof(val) ); }
void GSendInt(int val) { GDebug("Sending int %d (%#x) to %s\n", val, val, who); GWrite(&val, sizeof(val)); }
bool KCheckPass::GSendArr(int len, const char *buf) { return GWrite(&len, sizeof(len)) && GWrite (buf, len); }
bool KCheckPass::GSendInt(int val) { return GWrite(&val, sizeof(val)); }