1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;; An example of a generic transport engine, based on the protocol
4 ;; used by chess-network.el. The only parts missing are send and
5 ;; receive. This could be used for transmitting chess.el protocol
6 ;; over CTCP, for example.
8 ;; NOTE: Make sure that any housekeeping data you use is kept in
9 ;; buffer-local variables. Otherwise, multiple games played using the
10 ;; same kind of transport might collide.
14 (require 'chess-network)
16 (defalias 'chess-network-regexp-alist 'chess-transport-regexp-alist)
18 (defun chess-transport-handler (event &rest args)
19 "This is an example of a generic transport engine."
21 ((eq event 'initialize)
22 ;; initialize your transport here
26 ;; transmit the string given in (car args) to your outbound
27 ;; transport from here
30 ;; call (chess-engine-submit engine STRING) for text that arrives from
31 ;; your inbound transport
33 (provide 'chess-transport)
35 ;;; chess-transport.el ends here