Created
January 27, 2012 13:37
-
-
Save vseloved/1688833 to your computer and use it in GitHub Desktop.
Simplest tcp blackhole
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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