Update all actor usage of <- to not pass in from-actor.
[mudsync.git] / mudsync / networking.scm
index f12a7e0c86578927bcfa53d18eef1afb6a532ffb..d2593d11e2f92784b9b73803504a325bc248b499 100644 (file)
            (sockaddr:addr client-details)))
   (fcntl client F_SETFL (logior O_NONBLOCK (fcntl client F_GETFL)))
   (hash-set! (nm-clients nm) client-id client)
-  (<- nm (nm-send-input-to nm) 'new-client #:client client-id)
+  (<-* `(#:actor ,nm) (nm-send-input-to nm) 'new-client #:client client-id)
   (nm-client-receive-loop nm client client-id))
 
 (define (nm-client-receive-loop nm client client-id)
         (begin
           (nm-handle-line nm client client-id
                           (string-trim-right line #\return))
-          (when (actor-am-i-alive? nm)
+          (when (actor-alive? nm)
             (loop)))))
   (loop))
 
   "Handle a closed port"
   (format #t "DEBUG: handled closed port ~x\n" client-id)
   (hash-remove! (nm-clients nm) client-id)
-  (<- nm (nm-send-input-to nm) 'client-closed #:client client-id))
+  (<-* `(#:actor ,nm) (nm-send-input-to nm) 'client-closed #:client client-id))
 
 (define-method (nm-handle-port-eof nm client client-id)
   "Handle seeing an EOF on port"
   (format #t "DEBUG: handled eof-object on port ~x\n" client-id)
       (close client)
   (hash-remove! (nm-clients nm) client-id)
-  (<- nm (nm-send-input-to nm) 'client-closed #:client client-id))
+  (<-* `(#:actor ,nm) (nm-send-input-to nm) 'client-closed
+       #:client client-id))
 
 (define-method (nm-handle-line nm client client-id line)
   "Handle an incoming line of input from a client"
-  (<- nm (nm-send-input-to nm) 'client-input
+  (<-* `(#:actor ,nm) (nm-send-input-to nm) 'client-input
       #:data line
       #:client client-id))