home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel0_89.lha / Feel / Boot / socket.em < prev    next >
Encoding:
Text File  |  1993-07-09  |  783 b   |  47 lines

  1. ;; Eulisp Module
  2. ;; Author: pab
  3. ;; File: socket.em
  4. ;; Date: Thu Jul  1 13:09:07 1993
  5. ;;
  6. ;; Project:
  7. ;; Description: 
  8. ;;
  9.  
  10. (defmodule socket
  11.   (init
  12.    macros0
  13.    extras0
  14.    telos1
  15.    streams1
  16.    defs
  17.    sockets
  18.    table
  19.    )
  20.   ()
  21.   
  22.   (expose sockets)
  23.   
  24.   (defmethod output ((x <socket>) (s <string>))
  25.     (socket-write-string x s))
  26.  
  27.   (defmethod output ((x <socket>) (c <character>))
  28.     (socket-write-string x (convert c string)))
  29.   
  30.   (defmethod input ((x <socket>))
  31.     (let ((c (socket-read-char x)))
  32.       (format t "{~a}" c)
  33.       c))
  34.  
  35.   (defmethod uninput ((x <socket>) (c <character>))
  36.     (format t "unread: ~a~%" c)
  37.     (socket-unread-char x c))
  38.   
  39.   (defmethod close ((x <socket>))
  40.     (close-socket x))
  41.  
  42.   (defmethod flush ((x <socket>))
  43.     nil)
  44.   
  45.   ;; end module
  46.   )
  47.