The code constantly prints
server-process: nil instead of the server process name:
-*- lexical-binding: t; -*- (let* ((port 1234) (server-process 'something)) (setq server-process (make-network-process :server t :name "libbasecampel-oauth-http-server" :service port :buffer (generate-new-buffer "*libbasecampel-oauth-http-server*") :filter (lambda (_process _data) (message "server-process: %s" server-process)))))
Can someone please explain why I can't access the server process from the filter lambda? Also, I would like to know how to do it, my goal being to kill the server when data arrives.
In case you wonder, the
_process argument to the filter function is the client process, not the server one.