3 /* trp_tcp_client: Client 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. */
12 #include "gras/Transport/transport_interface.h"
14 /* XBT_LOG_NEW_DEFAULT_CATEGORY(test); */
16 int main(int argc,char *argv[]) {
21 memset(data_send,0,sizeof(data_send));
22 gras_init(&argc,argv,"trp.thresh=debug");
24 fprintf(stderr,"===[CLIENT]=== Contact the server\n");
25 TRYFAIL(gras_socket_client_from_file("-",&sock));
27 sprintf(data_send,"Hello, I am a little test data to send.");
28 fprintf(stderr,"===[CLIENT]=== Send data\n");
29 TRYFAIL(gras_trp_chunk_send(sock,data_send, sizeof(data_send)));
31 fprintf(stderr,"===[CLIENT]=== Exiting successfully\n");
32 gras_socket_close(sock);