Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Transport becomes a real module
[simgrid.git] / src / gras / Transport / transport_tcp.c
1 /* $Id$ */
2
3 /* tcp trp (transport) - send/receive a bunch of bytes from a tcp socket    */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2004 Martin Quinson.                                       */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #include "gras_private.h"
12 #include "transport_private.h"
13
14 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(trp_tcp,transport);
15
16 typedef struct {
17   int dummy;
18 } gras_trp_tcp_specific_t;
19
20 gras_error_t
21 gras_trp_tcp_init(void) {
22
23   gras_trp_tcp_specific_t *specific = malloc(sizeof(gras_trp_tcp_specific_t));
24   if (!specific)
25     RAISE_MALLOC;
26
27   return no_error;
28 }
29
30 void
31 gras_trp_tcp_exit(gras_trp_plugin_t *plugin) {
32   gras_trp_tcp_specific_t *specific = (gras_trp_tcp_specific_t*)plugin->specific;
33   free(specific);
34 }
35
36 gras_error_t gras_trp_tcp_socket_client(const char *host,
37                                         unsigned short port,
38                                         int raw, 
39                                         unsigned int bufSize, 
40                                         /* OUT */ gras_trp_sock_t **dst){
41   RAISE_UNIMPLEMENTED;
42 }
43
44 gras_error_t gras_trp_tcp_socket_server(unsigned short port,
45                                         int raw, 
46                                         unsigned int bufSize, 
47                                         /* OUT */ gras_trp_sock_t **dst){
48   RAISE_UNIMPLEMENTED;
49 }
50
51 void gras_trp_tcp_socket_close(gras_trp_sock_t **sd){
52   ERROR1("%s not implemented",__FUNCTION__);
53   abort();
54 }
55
56 gras_error_t gras_trp_tcp_select(double timeOut,
57                                  gras_trp_sock_t **sd){
58   RAISE_UNIMPLEMENTED;
59 }
60   
61 gras_error_t gras_trp_tcp_bloc_send(gras_trp_sock_t *sd,
62                                     void *data,
63                                     size_t size,
64                                     double timeOut){
65   RAISE_UNIMPLEMENTED;
66 }
67
68 gras_error_t gras_trp_tcp_bloc_recv(gras_trp_sock_t *sd,
69                                     void *data,
70                                     size_t size,
71                                     double timeOut){
72   RAISE_UNIMPLEMENTED;
73 }
74
75 gras_error_t gras_trp_tcp_flush(gras_trp_sock_t *sd){
76   RAISE_UNIMPLEMENTED;
77 }
78