view samples/sock.tp @ 362:7101ad443081

Add null terminator to string literals in x86 module and fix a bug that interfered with use of function name labels in call instructions
author Michael Pavone <pavone@retrodev.com>
date Sat, 25 Apr 2015 13:05:38 -0700
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
	}
}