开发者_运维百科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?
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.
精彩评论