-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
LibEvent-based socket API #1701
Conversation
c0fa329
to
4af6e8c
Compare
I think this is now ready for a major review - is this API sufficient, does it perform well, and is it documented enough? |
/** Returns true if the server has been started correctly and is currently listening for incoming connections. */ | ||
virtual bool IsListening(void) const = 0; | ||
}; | ||
typedef SharedPtr<cServerHandle> cServerHandlePtr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really necessary for this to be a shared_ptr rather than a unique_ptr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instance is returned by the cNetwork::Listen()
function and is also stored within the cNetworkSingleton
class.
Shall we merge now and open a new PR for the actual rewrite of the server internals (so that the Lua API can be developed in parallel in a separate PR)? |
I agree for a merge. |
After reading the |
This is mainly for WinXP and RasPi testing.
avoidss unused variable error in clang
The callback receives the error details.
The link-callbacks for each new accepted link are now received from the OnIncomingConnection listen-callback.
This allows the callback classes to store the link inside them and use it internally later on, mainly for sending data.
DO NOT MERGE YET!
This is a work-in-progress to implement a LibEvent-based socket API that both the C++ part and Lua plugins could use. The PR has been created as a platform for (early) code review; for discussion please use the forum thread:
http://forum.mc-server.org/showthread.php?tid=1700
Will fix #1352