Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1b5d4ece61f475df9722930d1bf1ce11 to your computer and use it in GitHub Desktop.
Save anonymous/1b5d4ece61f475df9722930d1bf1ce11 to your computer and use it in GitHub Desktop.
class Server {
static public function main() {
var s = new sys.net.Socket();
s.bind(new sys.net.Host("localhost"), 5000);
s.listen(1);
var client:sys.net.Socket = s.accept();
client.write("hello");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment