MCPcopy Create free account
hub / github.com/grpc/grpc-java / getSocket

Method getSocket

api/src/main/java/io/grpc/InternalChannelz.java:205–212  ·  view source on GitHub ↗

Returns a socket.

(long id)

Source from the content-addressed store, hash-verified

203
204 /** Returns a socket. */
205 @Nullable
206 public InternalInstrumented<SocketStats> getSocket(long id) {
207 InternalInstrumented<SocketStats> clientSocket = otherSockets.get(id);
208 if (clientSocket != null) {
209 return clientSocket;
210 }
211 return getServerSocket(id);
212 }
213
214 private InternalInstrumented<SocketStats> getServerSocket(long id) {
215 for (ServerSocketMap perServerSockets : perServerSockets.values()) {

Callers

nothing calls this directly

Calls 2

getServerSocketMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected