int FatalError(Display *display) { UNUSED_PARAM(display); Client_exit(0); /* make complier not warn */ return 0; }
void main() { char * sendBuf = (char *)malloc( sizeof(char) * (MAX_BUFSIZE + 1)); memset (sendBuf, 0, sizeof(char) * (MAX_BUFSIZE + 1)); int i = 0; for (i = 0; i <MAX_BUFSIZE; i ++) sendBuf[i] = 'a'; sendBuf[i] = '\0'; //Client_init("192.168.1.207", 6000); Client_init("127.0.0.1", 6000); int ret = Client_send( sendBuf, strlen(sendBuf) + 1, 0); free (sendBuf); sendBuf = NULL; Client_exit(); getchar(); }