void CPROC UDPServerRead( PCLIENT pc, POINTER buffer, uint32_t len, PSOCKADDR sa ) { if( !buffer ) { buffer = Allocate( 4096 ); } else SendUDPEx( pc, buffer, len, sa ); ReadUDP( pc, buffer, 4096 ); }
void SendPosition( int x, int y, int w, int h ) { char tmp[128]; int len; #undef snprintf #ifdef _MSC_VER #define snprintf _snprintf #endif len = snprintf( tmp, sizeof( tmp ), "<move x=\"%d\" y=\"%d\" width=\"%d\" Height=\"%d\"/>", x, y, w, h ); SendUDPEx( l.udp_socket, tmp, len, l.sendto ); }
void SendShow( void ) { SendUDPEx( l.udp_socket, "<show/>", 7, l.sendto ); }
void SendHide( void ) { SendUDPEx( l.udp_socket, "<hide/>", 7, l.sendto ); }