6 #include <gpxe/async.h>
7 #include <gpxe/hello.h>
9 static void test_hello_callback ( char *data, size_t len ) {
13 for ( i = 0 ; i < len ; i++ ) {
17 } else if ( ( c == '\n' ) || ( c >= 32 ) || ( c <= 126 ) ) {
25 void test_hello ( struct sockaddr_in *server, const char *message ) {
26 struct hello_request hello;
29 printf ( "Saying \"%s\" to %s:%d\n", message,
30 inet_ntoa ( server->sin_addr ), ntohs ( server->sin_port ) );
32 memset ( &hello, 0, sizeof ( hello ) );
33 hello.tcp.sin = *server;
34 hello.message = message;
35 hello.callback = test_hello_callback;
37 rc = async_wait ( say_hello ( &hello ) );
39 printf ( "HELLO fetch failed\n" );