English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 26 March 2017, 20:43   #1
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 37
Posts: 295
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:
sendmsgtest.c
recvmsgtest.c
sendmsgtest
recvmsgtest
patrik is online now  
AdSense AdSense  
Old 27 March 2017, 17:24   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,531
They are not implemented. (Don't ask why, I have no idea)

But I can attempt to implement them.
Toni Wilen is offline  
Old 27 March 2017, 18:17   #3
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 37
Posts: 295
Would be greatly appreciated .
patrik is online now  
Old 31 March 2017, 21:23   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,531
Done. (recvmsg not tested). winuae.7z or wait for next beta.

EDIT: could you add errno output to "recvmsg fail" output, I'd like to confirm returned error code(s) are also correct.

Last edited by Toni Wilen; 01 April 2017 at 13:09.
Toni Wilen is offline  
Old 01 April 2017, 13:43   #5
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 37
Posts: 295
Quote:
Originally Posted by Toni Wilen View Post
Done. (recvmsg not tested). winuae.7z or wait for next beta.

EDIT: could you add errno output to "recvmsg fail" output, I'd like to confirm returned error code(s) are also correct.
Both sendmsg() and recvmsg() works at my end.

Added errno codes.
patrik is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bsdsocket.Library Emufr3ak Coders. Asm / Hardware 5 25 December 2016 11:20
Crosscompiling with bsdsocket.library ciVic Coders. General 6 05 January 2016 11:56
winuae bsdsocket.library clauddio support.WinUAE 5 21 July 2015 21:47
e-uae bsdsocket.library with tcpip servers (telnetd)?? GeoKM support.OtherUAE 6 09 August 2013 12:34
FS-UAE and Internet (bsdsocket.library) on Windows elowan support.FS-UAE 11 26 January 2013 20:37

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:05.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.20159 seconds with 11 queries