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

Socket connect doesn't allow to set protcol and options #672

Closed
tong opened this issue Jan 8, 2022 · 2 comments · Fixed by #781
Closed

Socket connect doesn't allow to set protcol and options #672

tong opened this issue Jan 8, 2022 · 2 comments · Fixed by #781

Comments

@tong
Copy link
Contributor

tong commented Jan 8, 2022

kinc_socket_connect doesn't allow to set the protocol type (tcp, udp) nor socket options (non_blocking, broadcast, tcp_no_delay). Currently this is only possible when creating listening sockets with kinc_socket_open.

How about splitting up kinc_socket_open into something like:

kinc_socket_init(kinc_socket_t *sock, kinc_socket_protocol_t protocol);
kinc_socket_options_set(kinc_socket_t *sock, kinc_socket_options_t *options);
kinc_socket_bind(kinc_socket_t *sock, host, port);

So we can use kinc_socket_new and kinc_socket_options_set for socket_open and socket_connect.

@MoritzBrueckner
Copy link

@ RobDangerous Hi, I hope this doesn't come across as rude, but let me bump this issue since quite a few people are waiting for socket support in Armorcore which is currently on hold due to this question being unanswered (as far as I understand it this issue is just a question about the API design and @ tong could implement it).

With socket support we could finally fix an annoying limitation of Armory's live patch feature (and then add more stuff to it) and someone on the Armory Discord is creating networking logic nodes which currently do not work on the Krom target because of this.

@RobDangerous
Copy link
Member

Didn't realize it's a question. Go for it, tong.

tong added a commit to tong/Kinc that referenced this issue Sep 16, 2022
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

Successfully merging a pull request may close this issue.

3 participants