Get the type of connection.
This must be either DOFCONNECTIONTYPE_STREAM or DOFCONNECTIONTYPE_DATAGRAM.
This callback must not be NULL.