MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / CloseConnection

Function CloseConnection

source/src/cip/cipconnectionmanager.c:1385–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1383}
1384
1385void CloseConnection(CipConnectionObject *RESTRICT connection_object) {
1386
1387 if ( kConnectionObjectTransportClassTriggerTransportClass3 !=
1388 ConnectionObjectGetTransportClassTriggerTransportClass(connection_object) )
1389 {
1390 /* only close the UDP connection for not class 3 connections */
1391 CloseUdpSocket(
1392 connection_object->socket[kUdpCommuncationDirectionConsuming]);
1393 connection_object->socket[kUdpCommuncationDirectionConsuming] =
1394 kEipInvalidSocket;
1395 CloseUdpSocket(
1396 connection_object->socket[kUdpCommuncationDirectionProducing]);
1397 connection_object->socket[kUdpCommuncationDirectionProducing] =
1398 kEipInvalidSocket;
1399 }
1400 RemoveFromActiveConnections(connection_object);
1401 ConnectionObjectInitializeEmpty(connection_object);
1402
1403}
1404
1405
1406void AddNewActiveConnection(const CipConnectionObject *const connection_object)

Callers 1

Tested by

no test coverage detected