ondra
ondra

Reputation: 9331

Haskell socket recvmsg (path mtu discovery)

I am writing a tunneling application in Haskell that uses UDP. In order to get it 'right', I would like to set the MTU appropriately. However, I cannot find any easy way to do that.

Is there a recvmsg() implementation in haskell that would allow me to specify 'flags' parameter, or a different way to obtain the data from the error channel?

Upvotes: 2

Views: 196

Answers (1)

Heatsink
Heatsink

Reputation: 7751

If no API function turns up that suits your needs, you can interface with Network.Socket by extracting the socket ID and calling into C. While this isn't an easy way, it at least allows you to continue using the existing API in the rest of your code.

Upvotes: 1

Related Questions