> On 11 Sep 2023, at 17:29, Chris Angelico <[email protected]> wrote:
>
> On Tue, 12 Sept 2023 at 01:25, <[email protected]> wrote:
>>
>> It should do:
>> https://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/_Stdio/_port/set_accept_callback.html
>>
>> It exists within the documentation…? also Stdio.Port mainsock =
>> Stdio.Port(5555, accept_callback) and if (!mainsock->bind(5555,
>> accept_callback)) both tend to silently allow the code to execute, but the
>> callback is never executed non accept. So something is amiss.
>>
>
> Hmm, that's the internals. This is the public API:
>
> https://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/Stdio/Port.html
>
> And it doesn't seem to be there. So maybe that's an omission in the
> pmod? Not sure.
>
> ChrisA
The original state of the code had it using !bind(portnum, callbackfn) — those
being actually port numbers and the accept_callback function. But as noted,
both bind and Stdio.Port instantiation with the callback silently fail to
execute the callback it seems. I get the connection, but the callback is never
fired. At this point I stripped everything back just simply trying to make a
basic echo server. I forgot how much the documents assert knowledge and forgot
much of my own knowledge on Pike.