aboutsummaryrefslogtreecommitdiffstats
path: root/library/CBSP_Adapter.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/CBSP_Adapter.ttcn')
-rw-r--r--library/CBSP_Adapter.ttcn10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/CBSP_Adapter.ttcn b/library/CBSP_Adapter.ttcn
index de89d58b..278a2f24 100644
--- a/library/CBSP_Adapter.ttcn
+++ b/library/CBSP_Adapter.ttcn
@@ -77,6 +77,16 @@ runs on CBSP_Adapter_CT {
f_set_tcp_segmentation(idx);
}
+function f_wait_client_connect(integer idx := 0) runs on CBSP_Adapter_CT {
+ var IPL4asp_Types.PortEvent rx_event;
+ CBSP[idx].receive(IPL4asp_Types.PortEvent:{connOpened:=?}) -> value rx_event {
+ log("Connection from ", rx_event.connOpened.remName, ":", rx_event.connOpened.remPort);
+ /* we want to store the client's connId, not the 'bind socket' one */
+ g_cbsp_conn_id[idx] := rx_event.connOpened.connId;
+ }
+ f_set_tcp_segmentation(idx);
+}
+
function f_cbsp_send(template (value) CBSP_PDU pdu, integer idx := 0) runs on CBSP_Adapter_CT {
CBSP[idx].send(ts_CBSP_Send(g_cbsp_conn_id[idx], pdu));
}