gonzui


Format: Advanced Search

SearchGoogle itResults 1 - 1 of 1 for funcall:printf from t2ex/t2ex_source/kernel/sysmain/src/network_sample/net_test.c (0.00 seconds)
t2ex
t2ex_source/kernel/sysmain/src/network_sample/net_test.c - 12.1KB - 415 lines
81: 
82:         printf("[http] start\n");
83: 
88: if ( re < 0 ) { 89: printf("[http] FAILED\n"); 90: return; 91: } 92: printf(buf); 93: free(buf); 94: 95: printf("[http] OK\n"); 96: }
107: 108: printf("[getaddrinfo] start\n"); 109:
116: if ( size < 0 ) { 117: printf("[getaddrinfo] FAILED\n"); 118: return;
124: if ( re < 0 ) { 125: printf("[getaddrinfo] FAILED\n"); 126: return;
128: addr.s_addr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr; 129: printf("test_getaddrinfo: %s => %s\n", hostname, inet_ntop(AF_INET, &addr, rbuf, sizeof(rbuf))); 130: free(buf); 131: 132: printf("[getaddrinfo] OK\n"); 133: }
142: 143: printf("[getnameinfo] start\n"); 144:
153: if ( re < 0 ) { 154: printf("[getnameinfo] FAILED\n"); 155: return; 156: } 157: printf("test_getnameinfo: %s:%d => %s:%s\n", inet_ntop(AF_INET, &sa.sin_addr, rbuf, sizeof(rbuf)), ntohs(sa.sin_port), buf, buf2); 158:
163: if ( re < 0 ) { 164: printf("[getnameinfo] FAILED\n"); 165: return; 166: } 167: printf("test_getnameinfo: %s:%d => %s:%s\n", inet_ntop(AF_INET, &sa.sin_addr, rbuf, sizeof(rbuf)), ntohs(sa.sin_port), buf, buf2); 168: 169: printf("[getnameinfo] OK\n"); 170: }
193: 194: printf("[tcp(server)] start\n"); 195:
267: 268: printf("[tcp(server)] OK\n"); 269: return;
271: error: 272: printf("[tcp(server)] FAILED\n"); 273: if ( sd > 0 ) {
288: 289: printf("[tcp(client)] start\n"); 290:
301: re = so_connect(sd, (struct sockaddr*)&sa, sizeof sa); 302: printf("so_connect = %d(%d, %d)\n", re, MERCD(re), SERCD(re)); 303: if ( re < 0 ) {
327: 328: printf("[tcp(client)] OK\n"); 329: return;
335: so_break(server_tskid); 336: printf("[tcp(client)] FAILED\n"); 337: }
374: 375: printf(" == net test == \n"); 376:
409: 410: printf(" == net test end == \n"); 411: