Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Jan 30, 2025
1 parent 58a9436 commit 090ffd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/rpc/src/RpcSerialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ export const layerNdjson: Layer.Layer<RpcSerialization> = Layer.effect(RpcSerial
* @since 1.0.0
* @category serialization
*/
export const layeMsgPack: Layer.Layer<RpcSerialization> = Layer.succeed(RpcSerialization, msgPack)
export const layerMsgPack: Layer.Layer<RpcSerialization> = Layer.succeed(RpcSerialization, msgPack)
10 changes: 7 additions & 3 deletions packages/rpc/src/RpcServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ export class Protocol extends Context.Tag("@effect/rpc/RpcServer/Protocol")<Prot
readonly send: (clientId: number, response: Uint8Array | string) => Effect.Effect<void>
readonly end: (clientId: number) => Effect.Effect<void>
readonly supportsAck: boolean
readonly supportsTransferables: boolean
}>() {}

/**
Expand Down Expand Up @@ -666,7 +667,8 @@ export const makeProtocolSocketServer = Effect.gen(function*() {
end(_clientId) {
return Effect.void
},
supportsAck: true
supportsAck: true,
supportsTransferables: false
})
})

Expand Down Expand Up @@ -731,7 +733,8 @@ export const makeProtocolWithHttpAppWebsocket: Effect.Effect<
end(_clientId) {
return Effect.void
},
supportsAck: true
supportsAck: true,
supportsTransferables: false
})

return { protocol, httpApp } as const
Expand Down Expand Up @@ -848,7 +851,8 @@ export const makeProtocolWithHttpApp: Effect.Effect<
if (!client) return Effect.void
return client.end
},
supportsAck: false
supportsAck: false,
supportsTransferables: false
})

return { protocol, httpApp } as const
Expand Down

0 comments on commit 090ffd6

Please sign in to comment.