View Single Post
Old 26 March 2017, 21:43   #1
Registered User
patrik's Avatar
Join Date: Jan 2005
Location: Umeň
Age: 37
Posts: 396
UAE bsdsocket.library inconsistensy

I'm not sure that support.WinUAE is the correct forum for this as it regards all UAE version as far as I can tell, but I hope it will be ok anyway.

Recently I wrote some code to send a string passed as an argument over a TCP socket with an added newline. Thought it would be a good solution to use the scatter/gather functionality which appeared in bsdsocket V3 for this. More specifically, by using bsdsocket.library/sendmsg(), this could be solved without doing any of the following: modifying the string, creating a new string or doing two calls to bsdsocket.library.

This works perfectly with a regular TCP/IP-stack like AmiTCP 3.0b2, AmiTCP 4.0 or RoadShow. However when I tested it in UAE it didn't work. I say UAE as the results are the same in WinUAE, FS-UAE and E-UAE. In UAE sendmsg() always seems to return 0.

Did some more tests of the scatter/gather functionality and noticed that it was not just sendmsg() which always returned 0, but also the corresponding recvmsg().

UAE reports it has bsdsocket.library V4.1, so V3 function calls should be fine, right?

Test code and executables:
patrik is offline  
AdSense AdSense  
Page generated in 0.08147 seconds with 9 queries