Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Abstract event manager #1

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Abstract event manager #1

wants to merge 12 commits into from

Conversation

jmlvanre
Copy link

@jmlvanre jmlvanre commented Oct 3, 2014

sharing event manager API

… for the event_manager abstraction dependency injection.

For now: SocketManager -> EventManager -> internal::EventManager.
In this step we only virtualized (raised) the mandatory send() functions.
internal::EventManager exists to inject only the functions that http_proxy depends on.
…ocketManager derived class).

This also tackles the rename of the variable socket_manager -> event_manager.
…bev_event_manager.{h,c}pp

forward all io::* calls into virtual implementations in event_manager.
…nchmark requires a fork before libprocess is initialized. The benchmark uses 2 separate processmanagers in order to prevent short-circuiting of message passing.
…n enumeration representing what kind of IO should be performed.
@jmlvanre
Copy link
Author

jmlvanre commented Oct 3, 2014

This pull request is just a friendly environment for comments on this proposed change.

extern int __s__;

// Local IP address.
extern uint32_t __ip__;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why are we declaring the externs here?

{
cleanup();
}
typedef int id_t;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? isn't this just the socket fd?

// satisfy HTTP/1.1 pipelining. Each request should either enqueue a
// response, or ask the proxy to handle a future response. The process
// is responsible for making sure the responses are sent in the same
// order as the requests. Note that we use a 'Socket' in order to keep

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the names here change Socket<>Connection

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants