File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ import Edge
53
53
import Foundation
54
54
55
55
let server = try ! TCP.Server ()
56
- try server.bind (host : " 0.0.0.0" , port : 50000 )
56
+ try ! server.bind (host : " 0.0.0.0" , port : 50000 )
57
57
58
58
server.listen ().startWithNext { connection in
59
- let read = connection.read ()
60
- let strings = read .map { String (bytes : $0 , encoding : .utf8 )! }
59
+ let byteStream = connection.read ()
60
+ let strings = byteStream .map { String (bytes : $0 , encoding : .utf8 )! }
61
61
62
62
strings.onNext { message in
63
63
print (" Client \( connection ) says \" \( message ) \" !" )
@@ -71,7 +71,7 @@ server.listen().startWithNext { connection in
71
71
print (" Goodbye \( connection ) !" )
72
72
}
73
73
74
- read .start ()
74
+ byteStream .start ()
75
75
}
76
76
77
77
RunLoop.runAll ()
You can’t perform that action at this time.
0 commit comments