MCPcopy Index your code
hub / github.com/RsyncProject/rsync / recv_token

Function recv_token

token.c:1097–1116  ·  view source on GitHub ↗

* receive a token or buffer from the other end. If the return value is >0 then * it is a data buffer of that length, and *data will point at the data. * if the return value is -i then it represents token i-1 * if the return value is 0 then the end has been reached */

Source from the content-addressed store, hash-verified

1095 * if the return value is 0 then the end has been reached
1096 */
1097int32 recv_token(int f, char **data)
1098{
1099 switch (do_compression) {
1100 case CPRES_NONE:
1101 return simple_recv_token(f,data);
1102 case CPRES_ZLIB:
1103 case CPRES_ZLIBX:
1104 return recv_deflated_token(f, data);
1105#ifdef SUPPORT_ZSTD
1106 case CPRES_ZSTD:
1107 return recv_zstd_token(f, data);
1108#endif
1109#ifdef SUPPORT_LZ4
1110 case CPRES_LZ4:
1111 return recv_compressed_token(f, data);
1112#endif
1113 default:
1114 NOISY_DEATH("Unknown do_compression value");
1115 }
1116}
1117
1118/*
1119 * look at the data corresponding to a token, if necessary

Callers 1

receive_dataFunction · 0.85

Calls 4

simple_recv_tokenFunction · 0.85
recv_deflated_tokenFunction · 0.85
recv_zstd_tokenFunction · 0.85
recv_compressed_tokenFunction · 0.85

Tested by

no test coverage detected