Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#1238 closed proposal (wontfix)

ByteString based datagram communication

Reported by: robreim Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/network Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This patch adds ByteString? datagram communication.

In the process it replaces the TCP based sendTo and recvFrom functions from the Network module with ByteString? / datagram equivalents. Since sendTo and recvFrom seemed to be deprecated for anything more than superficial testing, the new versions would seem more useful.

It includes a fix to ensure Network.Socket.recvBufFrom and friends handle unix file sockets.

net003 has been included for testing the new features. I have only been able to test on GHC 6.6 on linux. Attempts to test with windows and hugs caused me issues I don't currently have time to deal with. If someone with these platforms can apply the patch and run the test case, I'd be very appreciative. I'll get onto any bugs discovered when I return.

I won't be available to guide this bug through for the next 9 days but wanted to get the proposal out there ready for when I get back.

Attachments (1)

network.patch (18.9 KB) - added by robreim 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by bos

This is the wrong approach, as it breaks the existing, stable API. Also, the restriction to AF_INET sockets is inappropriate. So as it stands, this patch is not suitable for use.

comment:2 Changed 7 years ago by robreim

The only thing "broken" by this change should be "sendTo" and "recvFrom" in the Network module, both of which are recommended against in the documentation. In the documents words: "Their use is strongly discouraged except for small test-applications or invocations from the command line.". So the only "breakage" that I'm aware of would be removing a couple of relatively useless functions and replacing them with equivalents which can be used in production.

I've also made quite a lot of effort to make sure it works with AF_UNIX, so I'm not sure what you mean by a restriction to AF_INET.

If you can clarify what you mean by these two statements, I'll work on fixing the issues.

comment:3 Changed 7 years ago by robreim

Oh, I should add that the recv functions for Network.Socket are already restricted to AF_INET. Part of this patch gets them working with AF_UNIX and should be easier to extend to other families.

Changed 7 years ago by robreim

comment:4 Changed 6 years ago by igloo

  • Resolution set to wontfix
  • Status changed from new to closed

This proposal seems to be abandoned

comment:5 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:6 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.