Skip to content

Add sockaddr information#140

Closed
dinosaure wants to merge 20 commits intomirage:masterfrom
dinosaure:master
Closed

Add sockaddr information#140
dinosaure wants to merge 20 commits intomirage:masterfrom
dinosaure:master

Conversation

@dinosaure
Copy link
Copy Markdown
Member

I notified this PR in mailing-list but I'm afraid it is unnoticed.

@dinosaure dinosaure changed the title Add sockaddr information (cf. dinosaure/ocaml-conduit@de3261b5) Add sockaddr information May 9, 2014
@rgrinberg
Copy link
Copy Markdown
Member

I agree with this change. But perhaps that big chunk of stuff being passed in the callback field should be a record? Make it a little more resilient to changing. Right now this change will cause some headaches to our users.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This unfortunately won't work, since Cohttp_lwt cannot depend on Unix -- only Cohttp_lwt_unix can. This information could possibly be encoded in the Cohttp.Connection.t though, and unpacked only in the relevant (Cohttp_lwt_unix or Mirage_http) backend.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another reason to perhaps making the first param to callback abstract? We could write our functor over it.

I did suggest Cohttp.Conncetion.t in the mailing list btw. I forgot why @dinosaure did not find satisfactory.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Maybe I'm wrong took me to add this information and I have not spent a lot of time :) I'll think about it this weekend on how to use the abstract type Cohttp.Connection.t so that ships sockaddr in Cohttp_lwt_unix.

@dinosaure
Copy link
Copy Markdown
Member Author

I think this is a better implementation but it is not perfect. I create a new Endpoint interface (same as IO model) for abstracting the sockaddr. The Connection module and its interface does not suit me and I think it should have used another (we can have a different ID but whose source is the same).

@rgrinberg
Copy link
Copy Markdown
Member

@dinosaure could you rebase on top of master so I can try this branch out?

Sorry, was too busy to review this carefully.

@avsm
Copy link
Copy Markdown
Member

avsm commented May 14, 2014

Likewise, I'm just back from travelling and can look tomorrow morning.

On 14 May 2014, at 16:16, Rudi Grinberg notifications@github.com wrote:

@dinosaure could you rebase on top of master so I can try this branch out?

Sorry, was too busy to review this carefully.


Reply to this email directly or view it on GitHub.

Conflicts:
	_oasis
	_tags
	cohttp/cohttp.mlpack
	cohttp/cohttp.odocl
	lwt/cohttp_lwt.ml
	lwt/cohttp_lwt.mli
	setup.ml
@dinosaure
Copy link
Copy Markdown
Member Author

I think, in regards new upstream/master, this PR is little outdated. This PR compile at home but I think that move Endpoint.S to S signature. I would look more precisely it tomorrow morning.

EDIT: Don't forget to update mirage/ocaml-conduit#2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this module aliased here?

rgrinberg added 5 commits May 17, 2014 16:53
With the new endpoint module it's not clear what's the purpose of
Connection. Seems better to get rid of old Connection and rename
Endpoint to be Connection.
@dinosaure dinosaure closed this May 28, 2014
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