Skip to content

Io socket handle for internal socket#13418

Closed
lambdai wants to merge 98 commits intoenvoyproxy:mainfrom
lambdai:bsock
Closed

Io socket handle for internal socket#13418
lambdai wants to merge 98 commits intoenvoyproxy:mainfrom
lambdai:bsock

Conversation

@lambdai
Copy link
Copy Markdown
Contributor

@lambdai lambdai commented Oct 7, 2020

Close in favor of #14712 and #14917

Commit Message:
Introduce BufferedIoSocketHandleImpl and UserSpaceFileEventImpl.
This socket handle owns the buffer for itself to read data from and for the peer to write to.
UserSpaceFileEventImpl is the FileEvent this socket could work with.

UserSpaceFileEventImpl provides 3 functions

  1. setEnabled(events) declared by FileEvent. The events are registered for callback. Each call detects fired events once, and IO handle will notify the new events in the long run.
  2. activate(events). Explicitly activate the events. The above enabling events are not honored.
  3. poll(events). It should only be used by IO handle. Unlike activate, poll honors the setEnabled.

The BufferedIoSocketHandleImpl work with ConnectionImpl, and TcpListenerFilter
fdDoNotUse The high level socket option should be intercepted by ConnectionSocket
instead of accessing the fd.

Will provide the example of ConnectionImpl and ConnectionSocket in the next PR.

Additional Description:
Extracted from #13361
Risk Level: Low. Production is not using this socket.
Testing: Added unit test.
Docs Changes: N/A
Release Notes: N/A

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants