Commit 8180119937fa9305ad419b8fa5045ca72cc8e067

Authored by Georg Hopp
1 parent 0acadc53

add connector

1 nobase_include_HEADERS = trcomm.h \ 1 nobase_include_HEADERS = trcomm.h \
2 tr/comm_end_point.h \ 2 tr/comm_end_point.h \
3 tr/connection.h \ 3 tr/connection.h \
  4 + tr/connector.h \
4 tr/protocol.h \ 5 tr/protocol.h \
5 tr/proto_message.h \ 6 tr/proto_message.h \
6 tr/protocol/raw.h \ 7 tr/protocol/raw.h \
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 3
4 #include "tr/comm_end_point.h" 4 #include "tr/comm_end_point.h"
5 #include "tr/connection.h" 5 #include "tr/connection.h"
  6 +#include "tr/connector.h"
6 #include "tr/protocol.h" 7 #include "tr/protocol.h"
7 #include "tr/proto_message.h" 8 #include "tr/proto_message.h"
8 #include "tr/protocol/raw.h" 9 #include "tr/protocol/raw.h"
@@ -5,6 +5,7 @@ AM_CFLAGS += -I../include/ @@ -5,6 +5,7 @@ AM_CFLAGS += -I../include/
5 5
6 TRCOMM = comm_end_point.c \ 6 TRCOMM = comm_end_point.c \
7 connection.c \ 7 connection.c \
  8 + connector.c \
8 protocol.c \ 9 protocol.c \
9 proto_message.c \ 10 proto_message.c \
10 protocol_raw.c \ 11 protocol_raw.c \
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
29 #include "trio.h" 29 #include "trio.h"
30 30
31 #include "tr/comm_end_point.h" 31 #include "tr/comm_end_point.h"
  32 +#include "tr/protocol.h"
32 #include "tr/interface/comm_end_point.h" 33 #include "tr/interface/comm_end_point.h"
33 34
34 static 35 static
@@ -38,7 +39,7 @@ commEndPointCtor(void * _this, va_list * params) @@ -38,7 +39,7 @@ commEndPointCtor(void * _this, va_list * params)
38 TR_CommEndPoint this = _this; 39 TR_CommEndPoint this = _this;
39 40
40 this->transport = va_arg(*params, TR_Socket); 41 this->transport = va_arg(*params, TR_Socket);
41 - this->protocol = va_arg(*params, void *); 42 + this->protocol = va_arg(*params, TR_Protocol);
42 this->read_chunk_size = va_arg(*params, int); 43 this->read_chunk_size = va_arg(*params, int);
43 this->do_close = 0; 44 this->do_close = 0;
44 this->read_buffer = TR_new(TR_Queue); 45 this->read_buffer = TR_new(TR_Queue);
@@ -52,6 +52,7 @@ connectionDtor(void * _this) @@ -52,6 +52,7 @@ connectionDtor(void * _this)
52 TR_Connection this = _this; 52 TR_Connection this = _this;
53 53
54 TR_delete(this->current_message); 54 TR_delete(this->current_message);
  55 + TR_PARENTCALL(_this, TR_Class, dtor);
55 } 56 }
56 57
57 static 58 static
Please register or login to post a comment