I am developing in AMZI prolog logic server, with Eclipse as IDE. I am using the example socket.pro proposed in https://github.com/AmziLS/interfaces/tree/master/samples/internet. In eclipse the socket communication runs fine as interpreted and as compiled version. Then I made an .exe following https://www.amzi.com/manuals/amzi/ls/lsxsock.htm. When starting the .exe it starts properly, but breaks down at the bind() command.
main :-
wsaStartup(0x0101, Ver, HighVer, Desc, Status, MaxSockets, MaxUdpDg),
sdefine('SOCK_STREAM', SOCK_STREAM),
socket(SOCK_STREAM, 0, Sock),
sdefine('INADDR_ANY', INADDR_ANY),
w_msgbox(foo1),
bind(Sock, INADDR_ANY, 50540 ),
write(sock: Sock),nl,
listen(Sock, 1),
write( listening),nl,
repeat,
select([Sock], [Sock], [Sock], 0, 0, ReadList, WriteList, ErrorList),
catch(doreads(ReadList), X, endmain(Sock, X, Quit)),
Quit == yes.
( This bind succeeds in Eclipse; the port is declared in the security rules of AWS EC2 and the firewall of Win 10)
Can you please help me?