English Amiga Board


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: 43
Posts: 924
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 offline  
Old 27 March 2017, 17:24   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
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: 43
Posts: 924
Would be greatly appreciated .
patrik is offline  
Old 31 March 2017, 21:23   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
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: 43
Posts: 924
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 offline  
 


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 13:21.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10848 seconds with 13 queries