3 /* trp_tcp_server: Server of a test case for the tcp transport. */
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */
7 /* This program is free software; you can redistribute it and/or modify it
8 * under the terms of the license (GNU LGPL) which comes with this package. */
16 #include "gras/Transport/transport_interface.h"
18 XBT_LOG_NEW_CATEGORY(test,"Logging for this test");
24 int main(int argc,char *argv[]) {
28 gras_init(&argc,argv);
30 fprintf(stderr,"===[SERVER]=== Create the socket\n");
31 sock = gras_socket_server_from_file("-");
33 fprintf(stderr,"===[SERVER]=== Waiting for the data\n");
34 gras_trp_recv(sock,data_recv, sizeof(data_recv));
35 fprintf(stderr,"===[SERVER]=== Got '%s'.\n", data_recv);
37 fprintf(stderr,"===[SERVER]=== Exiting successfully\n");
38 gras_socket_close(sock);