Skip to content

Instantly share code, notes, and snippets.

@vseloved
Created January 27, 2012 13:37
Show Gist options
  • Save vseloved/1688833 to your computer and use it in GitHub Desktop.
Save vseloved/1688833 to your computer and use it in GitHub Desktop.
Simplest tcp blackhole
(ql:quickload :usocket)
(defun start-blackhole (&optional (port 80))
(let ((sock (usocket:socket-listen "0.0.0.0" port :reuse-address t)))
(loop (let ((conn (usocket:socket-accept sock)))
(format t "Connected ~A~%" (slot-value conn 'usocket::stream))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment