Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import net
  2.  
  3. # The TCP handles require some work before you can do this for real.
  4. # It's about 8-12 hours of development before this works.
  5.  
  6. main = :
  7. server = net.tcp_server("localhost:8000")
  8. try
  9. while server.active
  10. client = server.accept()
  11. schedule(client_connect, client)
  12. finally
  13. server.close()
  14.  
  15. client_connect = (client):
  16. client.write(client.read())
  17. client.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement