Skip to content

Non-blocking sockets (Libevent+Kissnet)#99

Closed
ohlidalp wants to merge 11 commits intoRigsOfRods:masterfrom
ohlidalp:libevent
Closed

Non-blocking sockets (Libevent+Kissnet)#99
ohlidalp wants to merge 11 commits intoRigsOfRods:masterfrom
ohlidalp:libevent

Conversation

@ohlidalp
Copy link
Copy Markdown
Member

@ohlidalp ohlidalp commented Oct 14, 2019

As far as I can remember, rorserver had stability issues with disconnecting. Recently I tried my best to "just fix it" but still failed: #90

I took my time to learn everything about sockets and servers, and I found out the following:

  • It's hard; there's no single definite guide.
  • but, our best bet is to switch from "blocking sockets and threads" design to "nonblocking sockets and events" design.

I'm opening this draft PR as a ticket for the project board, the code builds (you need libevent2) and runs but doesn't really work yet.

ohlidalp and others added 11 commits September 28, 2019 22:40
Prototype - A 1:1 replacement with minor adjustments for readable diff. Refactoring will follow.

STATUS: rorserver with angelscript work, webserver doesn't build.
STATUS: ~40% done, won't build.

TODO: actual read/write of client socket data, see http://www.wangafu.net/~nickm/libevent-book/Ref6_bufferevent.html
status: ~52% done, won't build.
Status: ~64% done, not building
TODO: client - send data, process events.
connection and event-registration now works
@RoRBot
Copy link
Copy Markdown

RoRBot commented Oct 14, 2019

Build ror-server 76-gmifxvib failed (commit 7843faec53 by @only-a-ptr)

@ohlidalp
Copy link
Copy Markdown
Member Author

Obsoleted by #143

@ohlidalp ohlidalp closed this Apr 29, 2022
@ohlidalp ohlidalp deleted the libevent branch September 1, 2025 19:31
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 this pull request may close these issues.

3 participants