Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import net
- # The TCP handles require some work before you can do this for real.
- # It's about 8-12 hours of development before this works.
- main = :
- server = net.tcp_server("localhost:8000")
- try
- while server.active
- client = server.accept()
- schedule(client_connect, client)
- finally
- server.close()
- client_connect = (client):
- client.write(client.read())
- client.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement