[S]imple [N]etwork [C]onnection win and lin 32/64-bit.

Post your FreeBASIC source, examples, tips and tricks here. Please don’t post code without including an explanation.
Post Reply
praetor
Posts: 7
Joined: Nov 16, 2022 3:50

Re: [S]imple [N]etwork [C]onnection win and lin 32/64-bit.

Post by praetor »

I hate to be a PITA, but what do we need to do to get this working? Your library is by far the easiest way of doing networking in FreeBASIC, and I don't really want to reinvent the wheel.

I've tried cracking at it myself, but while I'm a seasoned C programmer, FreeBASIC is new to me and fixing this is a little outside my pay grade. The documentation for FreeBASIC compiler warnings is, well, just not there. So I really have no starting point to fixing this.

Ideas? It's a quick fix. The 4th setsockopt needs to be changed to something. I don't know what that something should be, but I bet you do! :D

--AE
D.J.Peters wrote: Nov 18, 2022 23:08 show me the declaration of "setsockopt" in your include file please
srvaldez
Posts: 3060
Joined: Sep 25, 2005 21:54

Re: [S]imple [N]etwork [C]onnection win and lin 32/64-bit.

Post by srvaldez »

the function declaration for setsockopt in Windows is in win/winsock2.bi, don't know where it is in Linux but the correction needed is probably the same

Code: Select all

declare function setsockopt(byval s as SOCKET, byval level as long, byval optname as long, byval optval as const zstring ptr, byval optlen as long) as long

the 4th argument is byval optval as const zstring ptr
so try and change cptr(const any ptr,@tmp) to cptr(const zstring ptr,@tmp)

the ???sock2.bi may be wrong declaring it as zstring ptr, it probably should be any ptr
praetor
Posts: 7
Joined: Nov 16, 2022 3:50

Re: [S]imple [N]etwork [C]onnection win and lin 32/64-bit.

Post by praetor »

I wonder if there have been changes to sock.bi that broke SNC. I'm sorta busy atm playing with my HP-UX machine, but I'll look at it at bedtime :D
Post Reply