Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "socket"
- # goes with tcp_server.cr
- socket = TCPSocket.new "127.0.0.1", 9000
- loop do
- socket << "message"
- sleep 0.01
- end
- CMacbook-Pro-3:crystal ms$ crystal tcp_server.cr
- listen on 127.0.0.1:9000
- 127.0.0.1:53540 connected
- 90
- 88
- 90
- 87
- 89
- 88
- 89
- 88
- 88
- 88
- 89
- 88
- 89
- 89
- 89
- 88
- 89
- 90
- 87
- 89
- 88
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement