Skip to content
Go to file
Cannot retrieve contributors at this time
12 lines (10 sloc) 309 Bytes
// Echo Daemon
// - to compile in Swift 3 invoke: swift build
// - to run result: .build/debug/echod
import net
net.createServer { sock in
print("# accepted socket.")
sock.write("Welcome to!\r\n")
sock | sock
.listen(1337) { address in print("echod: running \(address)") }
You can’t perform that action at this time.