| 167 | } |
| 168 | |
| 169 | bool local_socket_tcp_impl::update(vsomeip_sec_client_t& _client, configuration const& _configuration) { |
| 170 | auto address = peer_endpoint_.address(); |
| 171 | auto port = peer_endpoint_.port(); |
| 172 | |
| 173 | if (address.is_v4()) { |
| 174 | _client.host = htonl(uint32_t(address.to_v4().to_uint())); |
| 175 | } |
| 176 | if (role_ == socket_role_e::CLIENT) { |
| 177 | // temporary hack, because this used to be called only for incoming (not outgoing!) |
| 178 | // tcp connections, and security lib does not have configuration for _some_ outgoing |
| 179 | // connections |
| 180 | port += 1; |
| 181 | } |
| 182 | _client.port = htons(port); |
| 183 | |
| 184 | _configuration.get_security()->sync_client(&_client); |
| 185 | return true; |
| 186 | } |
| 187 | port_t local_socket_tcp_impl::own_port() const { |
| 188 | return own_endpoint_.port(); |
| 189 | } |
nothing calls this directly
no test coverage detected