Skip to content

Commit 7a40b0a

Browse files
committed
Revise: add pong closure to websocket
1 parent 9f160af commit 7a40b0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/DemoServer.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ public func demoServer(_ publicDir: String) -> HttpServer {
180180
session.writeText(text)
181181
}, { (session, binary) in
182182
session.writeBinary(binary)
183-
})
183+
}, { (session, pong) in
184+
// Got a pong frame
185+
}
186+
)
184187

185188
server.notFoundHandler = { r in
186189
return .movedPermanently("https://github.com/404")

0 commit comments

Comments
 (0)