Skip to content

Instantly share code, notes, and snippets.

@AxGord
Created March 10, 2015 13:57
Show Gist options
  • Save AxGord/80180646a952b7479364 to your computer and use it in GitHub Desktop.
Save AxGord/80180646a952b7479364 to your computer and use it in GitHub Desktop.
package;
import pony.net.SocketClient;
import pony.net.SocketServer;
class StringSocketExample
{
static function main()
{
var server = new SocketServer(6001);
server.onString << function(data:String) trace(data);
var client = new SocketClient(6001);
client.sendString('Hello world!');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment