Passing information over the web

Discussions related to network, internet and socket programming; also to serial, parallel, Bluetooth, USB etc.
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: Passing information over the web

Post by Richard Russell »

Ric wrote: Sat 04 Jan 2025, 19:40 is it possible to find the socket number associated with a listening socket, if say socket% has been zeroed before connected% has been established.
Can you list some (hopefully simple) code which illustrates what you are trying to achieve?
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Re: Passing information over the web

Post by Ric »

Evening Richard, thanks for the reply.
Im not really trying to accomplish anything, it was really just a hyperthetical question. The sort of thing thats pops into your head whilst trying to get some shut eye.
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: Passing information over the web

Post by Richard Russell »

Ric wrote: Mon 06 Jan 2025, 16:26 Im not really trying to accomplish anything, it was really just a hyperthetical question.
I didn't really understand it, TBH, since you seemed to be asking how to retrieve a value that you'd already discarded! The answer to that has to be "you can't". :roll:

In case it helps, I would point out that whilst compatible socklib.bbc libraries are supplied with BBC BASIC for Windows, BBC BASIC for SDL 2.0, the BBC BASIC Console Mode editions and BBC BASIC for the Raspberry Pi Pico W they are very substantially different from each other. You need only compare them to confirm that.

Indeed socklib.bbc is one of the prime examples of a library whose primary purpose is to provide a uniform interface to BASIC programs when the underlying OS APIs supporting that functionality are very different between platforms (the other main example is the 3D graphics libraries which provide a uniform interface despite OpenGL and Direct3D being significantly different).

So if what you had in mind was some solution which involved delving into the underlying OS APIs that really isn't relevant to BBC BASIC because, even if possible, it wouldn't be cross-platform compatible.
Ric
Posts: 200
Joined: Tue 17 Apr 2018, 21:03

Re: Passing information over the web

Post by Ric »

Thanks for the in depth answer, I wasn't really hoping for anything and it's not something I was needing or looking to do, as I said, just an arbitrary question.
Kind regards Ric
Kind Regards Ric.

6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023