Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated to reflect new api (connection->new_request becomes
connection->parser->new_request)
  • Loading branch information
sd committed Dec 29, 2009
1 parent 29875f3 commit c39216d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/hello_world.c
Expand Up @@ -49,8 +49,9 @@ static void request_complete(ebb_request *request)
free(request);
}

static ebb_request* new_request(ebb_connection *connection)
static ebb_request* new_request(void *d)
{
ebb_connection *connection = d;
//printf("request %d\n", ++c);
ebb_request *request = malloc(sizeof(ebb_request));
ebb_request_init(request);
Expand All @@ -73,8 +74,9 @@ ebb_connection* new_connection(ebb_server *server, struct sockaddr_in *addr)
}

ebb_connection_init(connection);
ebb_http_init(connection);
connection->data = connection_data;
connection->new_request = new_request;
connection->parser->new_request = new_request;
connection->on_close = on_close;

//printf("connection: %d\n", c++);
Expand All @@ -91,7 +93,7 @@ int main()
server.new_connection = new_connection;

printf("hello_world listening on port 5000\n");
ebb_server_listen_on_port(&server, 5000);
ebb_tcp_server(&server, NULL, 5000);
ev_loop(loop, 0);

return 0;
Expand Down

0 comments on commit c39216d

Please sign in to comment.