> On 11 Sep 2023, at 17:18, Chris Angelico <ros...@gmail.com> wrote:
> 
> On Tue, 12 Sept 2023 at 01:14, <kevin@limping.ninja> wrote:
>> 
>> int main() { … mainsock->set_accept_callback(accept_callback); ... }
>> 
>> Attempt to call the NULL-value
>> Unknown program: 0(/main()->accept_callback)
>> main.pike:53: /main()->main()
>> 
> 
> Looks like it's not a syntax problem, but that there's no
> set_accept_callback method. I don't know if that was ever a thing, but
> it isn't now. Are you able to initialize the Port with the callback
> already set?
> 
> Stdio.Port mainsock = Stdio.Port(12345, accept_callback);
> 
> ChrisA

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.


Reply via email to