Skip to content

Commit

Permalink
update peer
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Oct 24, 2024
1 parent 798da5c commit 1d0befa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Networking/Tests/NetworkingTests/PeerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ struct PeerTests {
MockEphemeralMessageDecoder(kind: kind)
}

// deal with data
func handle(connection _: any ConnectionInfoProtocol, request: Request) async throws -> Data {
let data = request.data

guard data.count >= 4 else {
throw NSError(
domain: "ExtractError", code: 1,
Expand All @@ -116,10 +114,8 @@ struct PeerTests {

func handle(
connection _: any Networking.ConnectionInfoProtocol,
message: PeerTests.MockRequest<PeerTests.UniquePresistentStreamKind>
) async throws {
print("Present handle received: \(String(decoding: message.data, as: UTF8.self))")
}
message _: PeerTests.MockRequest<PeerTests.UniquePresistentStreamKind>
) async throws {}

typealias StreamKind = UniquePresistentStreamKind
typealias Request = MockRequest<UniquePresistentStreamKind>
Expand Down

0 comments on commit 1d0befa

Please sign in to comment.