Fix Win socket demo

This commit is contained in:
Nikolay Igotti
2017-10-24 17:50:38 +03:00
parent 09b1f09071
commit d872d8032e
+2 -2
View File
@@ -54,10 +54,10 @@ fun main(args: Array<String>) {
buffer.usePinned { pinned ->
while (true) {
val length = recv(commFd, pinned.addressOf(0), buffer.size.signExtend(), 0)
val length = recv(commFd, pinned.addressOf(0), buffer.size.signExtend(), 0).toInt()
.ensureUnixCallResult("read") { it >= 0 }
if (length == 0L) {
if (length == 0) {
break
}