Guest User

Untitled

a guest
Dec 12th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. require "socket"
  2.  
  3. # goes with tcp_server.cr
  4.  
  5. socket = TCPSocket.new "127.0.0.1", 9000
  6.  
  7. loop do
  8. socket << "message"
  9. end
  10.  
  11. Macbook-Pro-3:crystal ms$ crystal tcp_server.cr
  12. listen on 127.0.0.1:9000
  13. 127.0.0.1:53569 connected
  14. 113
  15. 0
  16. 0
  17. 0
  18. 0
  19. 0
  20. 0
  21. 0
  22. 0
Add Comment
Please, Sign In to add comment