MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeCancelRequest

Function encodeCancelRequest

packages/sql/pg/src/PgProtocol.ts:1223–1234  ·  view source on GitHub ↗
(options: {
  readonly pid: number
  readonly secret: number
})

Source from the content-addressed store, hash-verified

1221 * @since 4.0.0
1222 */
1223export const encodeCancelRequest = (options: {
1224 readonly pid: number
1225 readonly secret: number
1226}): Uint8Array => {
1227 const writer = sharedWriter
1228 writer.begin()
1229 writer.int32(16)
1230 writer.int32(CANCEL_REQUEST_CODE)
1231 writer.int32(options.pid)
1232 writer.int32(options.secret)
1233 return writer.finish()
1234}
1235
1236// -----------------------------------------------------------------------------
1237// backend messages

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
int32Method · 0.45
finishMethod · 0.45

Tested by

no test coverage detected