view samples/sock.tp @ 222:c6e321a538d4

Implemented more of the grammar. Dealt with some name conflicts along the way.
author Michael Pavone <pavone@retrodev.com>
date Sun, 29 Dec 2013 13:08:01 -0800
parents 4c96a393103e
children
line wrap: on
line source

#{
	main <- {
		sock <- socket connectTo: "127.0.0.1" onPort: 12345
		sock send: "Hello, Socket!\n"
		response <- sock recv: 1024
		print: (string: response)
		sock close
		0
	}
}