Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open networking sockets using NetworkConfigEntry options. #169

Open
cBournhonesque opened this issue Apr 14, 2024 · 0 comments
Open

Comments

@cBournhonesque
Copy link
Contributor

cBournhonesque commented Apr 14, 2024

If I open a socket with Vec<NetworkingConfigEntry> on the server, I get the error:

operation was unsuccessful an invalid handle was returned

My server code is

pub(crate) fn get_networking_options(
    conditioner: &Option<LinkConditionerConfig>,
) -> Vec<NetworkingConfigEntry> {
    let mut options = vec![NetworkingConfigEntry::new_int32(
        NetworkingConfigValue::NagleTime,
        0,
    )];
    if let Some(ref conditioner) = conditioner {
        options.push(NetworkingConfigEntry::new_int32(
            NetworkingConfigValue::FakePacketLagRecv,
            conditioner.incoming_latency.as_millis() as i32,
        ));
        options.push(NetworkingConfigEntry::new_int32(
            NetworkingConfigValue::FakePacketReorderTime,
            conditioner.incoming_jitter.as_millis() as i32,
        ));
    }
    options
}
let options = get_networking_options(&self.conditioner);
 self.listen_socket = Some(
            self.client
                .networking_sockets()
                .create_listen_socket_ip(server_addr, options)
                .context("could not create server listen socket")?,
        );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant