English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 April 2018, 00:18   #1
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 564
Confused about Socket programming and UAE / FSUAE

I have a project that's going to involve TCP/IP socket comms between an Amiga and a Linux host, and never having done any TCP/IP programming on the Amiga before, I'm trying to figure out what I need.

I'm using VBCC as a cross-compiler, Linux hosted, and want to use UAE or FS-UAE to test and debug.

I downloaded the AmiTCP devkit from Aminet, and can compile the httpget example, but both the resulting binary and the pre-built binaries in the devkit fail under both UAE and FS-UAE, complaining that they can't open bsdsocket.library. Yet under both emulators, network software such as iBrowse, AWeb, YAM, etc. works just fine.

Can anyone give me any hints here?
robinsonb5 is offline  
AdSense AdSense  
Old 22 April 2018, 13:49   #2
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 248
Quote:
Originally Posted by robinsonb5 View Post
I have a project that's going to involve TCP/IP socket comms between an Amiga and a Linux host, and never having done any TCP/IP programming on the Amiga before, I'm trying to figure out what I need.

I'm using VBCC as a cross-compiler, Linux hosted, and want to use UAE or FS-UAE to test and debug.

I downloaded the AmiTCP devkit from Aminet, and can compile the httpget example, but both the resulting binary and the pre-built binaries in the devkit fail under both UAE and FS-UAE, complaining that they can't open bsdsocket.library. Yet under both emulators, network software such as iBrowse, AWeb, YAM, etc. works just fine.

Can anyone give me any hints here?

I’m interested in this also but from an assembly point of view.

Basically, if my bomb jack game detects my remote linux server over tcp/ip then i want to send over the hi-scores.

I’ll start looking into this soon.
mcgeezer is offline  
Old 22 April 2018, 15:02   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,073
Perhaps they want higher bsdsocket.library version? Attach or upload small example executable.
Toni Wilen is online now  
Old 22 April 2018, 15:17   #4
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 564
Thanks for the responses - the example code in the AmiTCP dev kit asks for version 4, but changing that to 0 makes no difference. Example code attached:

Code:
#include <stdio.h>

#include <exec/types.h>
#include <proto/exec.h>

struct Library *SocketBase;

int main(int argc,char **argv)
{
	SocketBase=OpenLibrary("bsdsocket.library",0);
	if(SocketBase)
		printf("Successfully opened bsdsocket.library\n");
	else
		printf("Failed to open bsdsocket.library\n");
	return(0);
}
Just opening the library fails, which confuses me greatly given that other network-aware software works just fine!

I haven't had a chance to test with WinUAE yet - this is with Linux UAE and FSUAE.
Attached Files
File Type: zip bsdsockettest.zip (3.4 KB, 3 views)
robinsonb5 is offline  
Old 22 April 2018, 16:08   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,073
Works for me (succesfully opened...)

There should not be any functional difference between different UAE variants in bsdsocket.library emulation.
Toni Wilen is online now  
Old 23 April 2018, 00:07   #6
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 564
Thanks for testing. I've found the source of the problem - it turns out the version of uae I'm using doesn't have bsdsocket support compiled in (and I hadn't found the user-interface option to enable it on fs-uae). Under both environments IBrowse was appearing to work because there was a years-old copy of google.com in its cache, which hadn't been flushed because I don't have rtc emulation enabled!

Doh!

Thanks again for responding - sorry for the false alarm.
robinsonb5 is offline  
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
OS4.1FE and latest stable FSUAE under macOS >issue< pixelsmack support.FS-UAE 3 01 August 2017 15:38
FS-UAE 2.4.1 + OAGD.net (I'm confused) Xorcist support.FS-UAE 3 24 April 2015 11:24
whdload via <config>.fsuae file? Mousey support.FS-UAE 10 16 December 2014 14:29
FSUAE arcade problems zubaran support.FS-UAE 0 19 September 2014 13:16
UAE questions (Programming) xArtx support.OtherUAE 2 12 June 2013 09:13

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 08:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06261 seconds with 14 queries