Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created November 2, 2012 15:01
Show Gist options
  • Select an option

  • Save jorgenschaefer/4001866 to your computer and use it in GitHub Desktop.

Select an option

Save jorgenschaefer/4001866 to your computer and use it in GitHub Desktop.
(defun test-filter (process string)
(with-current-buffer (process-buffer process)
(insert "Filter: " string)))
(defun test-sentinel (process event)
(with-current-buffer (process-buffer process)
(insert "Sentinel: " event)))
(let ((buf (get-buffer-create "*Test*")))
(make-network-process :name "*Test*"
:buffer buf
:host "localhost"
:service 12345
:coding 'raw-text-dos
:nowait t
:noquery t
:filter #'test-filter
:sentinel #'test-sentinel
:keepalive t)
(display-buffer "*Test*"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment