[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[tinn8] 01 simple network test

"get local network IP"
| network |
network := # #require: #Network.
self print: 'local IP: ', network GetLocalAddress


"Network and FFI must be present"
#(Network FFI) do: [:lib|
	Smalltalk at: lib ifAbsent: [
		self note: lib ,' required for Network tests'.
		self abortPage
	]
]


"get computer names"
#(	dnsHostName dnsDomain dnsFullyQualified
	netBIOS physicalNetBIOS physicalDnsHostname
	physicalDnsDomain physicalDnsFullyQualified
) do: [:type|
	self print: type ,'=',(Network perform: type)
]