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

how to use pollnet.dll in vc++create websocket server/CLIENT? #22

Open
xiaoyaocode163 opened this issue Nov 26, 2024 · 1 comment
Open

Comments

@xiaoyaocode163
Copy link

how to use pollnet.dll in vc++create websocket server/CLIENT
DO YOU HAVE A sample,thank you

pollnet_listen_ws

windows it's cdecl dll?how to exports stdcall dll?

@xiaoyaocode163
Copy link
Author

#[no_mangle]
pub unsafe extern "C" fn pollnet_open_ws(ctx: *mut PollnetContext, url: *const c_char) -> u64 {
let ctx = unsafe { &mut *ctx };
let url = c_str_to_string(url);
ctx.open_ws(url).into()
}

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