Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/grpc-js/src/server-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type ServerSurfaceCall = {
sendMetadata(responseMetadata: Metadata): void;
getDeadline(): Deadline;
getPath(): string;
getHost(): string;
} & EventEmitter;

export type ServerUnaryCall<RequestType, ResponseType> = ServerSurfaceCall & {
Expand Down Expand Up @@ -109,6 +110,10 @@ export class ServerUnaryCallImpl<RequestType, ResponseType>
getPath(): string {
return this.path;
}

getHost(): string {
return this.call.getHost();
}
}

export class ServerReadableStreamImpl<RequestType, ResponseType>
Expand Down Expand Up @@ -145,6 +150,10 @@ export class ServerReadableStreamImpl<RequestType, ResponseType>
getPath(): string {
return this.path;
}

getHost(): string {
return this.call.getHost();
}
}

export class ServerWritableStreamImpl<RequestType, ResponseType>
Expand Down Expand Up @@ -190,6 +199,10 @@ export class ServerWritableStreamImpl<RequestType, ResponseType>
return this.path;
}

getHost(): string {
return this.call.getHost();
}

_write(
chunk: ResponseType,
encoding: string,
Expand Down Expand Up @@ -259,6 +272,10 @@ export class ServerDuplexStreamImpl<RequestType, ResponseType>
return this.path;
}

getHost(): string {
return this.call.getHost();
}

_read(size: number) {
this.call.startRead();
}
Expand Down