X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fnetworking.scm;h=9f98a9ad112680be65d5a936b5323b8f3b2c3337;hp=fe641cc9a227556ee945a8fc58b18a5f3b052ea3;hb=50cd2aba8f13ec7aecb58a683aa55ae665cf83ab;hpb=7248fd4470039dab59a8e3a95829952e91c0fd19 diff --git a/mudsync/networking.scm b/mudsync/networking.scm index fe641cc..9f98a9a 100644 --- a/mudsync/networking.scm +++ b/mudsync/networking.scm @@ -1,3 +1,21 @@ +;;; Mudsync --- Live hackable MUD +;;; Copyright © 2016 Christopher Allan Webber +;;; +;;; This file is part of Mudsync. +;;; +;;; Mudsync is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Mudsync is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Mudsync. If not, see . + (define-module (mudsync networking) #:use-module (8sync systems actors) #:use-module (8sync agenda) @@ -145,14 +163,16 @@ "Handle a closed port" (format #t "DEBUG: handled closed port ~x\n" client-id) (8sync-port-remove client) - (hash-remove! (nm-clients nm) client-id)) + (hash-remove! (nm-clients nm) client-id) + (<- 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) (8sync-port-remove client) - (hash-remove! (nm-clients nm) client-id)) + (hash-remove! (nm-clients nm) client-id) + (<- 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"