Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Network.Socket.Types (internal reorganization) #70

Closed
wants to merge 1 commit into from

2 participants

@joeyadams

This moves the definition of some types (Socket, SockAddr, etc.) and some of their helper functions to a new hidden module called Network.Socket.Types. This moves a lot of code around, but does not change the external interface.

I also added these accessors, but did not export them to users:

sockFd       (MkSocket n _ _ _ _) = n
sockFamily   (MkSocket _ f _ _ _) = f
sockType     (MkSocket _ _ t _ _) = t
sockProtocol (MkSocket _ _ _ p _) = p
sockStatus   (MkSocket _ _ _ _ s) = s

I'm working on a new IO manager for Windows based on completion ports. Having a Types module will let me implement Windows-specific bindings in a separate module, rather than clutter Network.Socket even more.

@joeyadams joeyadams Add Network.Socket.Types (internal reorganization)
This does not change the external interface, except for making a few orphan
instances available in Network.Socket.Internal that weren't before
(e.g. Num instances for PortNumber).
339788f
@tibbe
Owner

Merged with minor tweaks.

@tibbe tibbe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 25, 2012
  1. @joeyadams

    Add Network.Socket.Types (internal reorganization)

    joeyadams authored Joey Adams committed
    This does not change the external interface, except for making a few orphan
    instances available in Network.Socket.Internal that weren't before
    (e.g. Num instances for PortNumber).
Something went wrong with that request. Please try again.