MCPcopy Create free account
hub / github.com/Recordscript/recordscript / next

Method next

libs/hbb_common/src/udp.rs:131–146  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

129
130 #[inline]
131 pub async fn next(&mut self) -> Option<ResultType<(BytesMut, TargetAddr<'static>)>> {
132 match self {
133 Self::Direct(f) => match f.next().await {
134 Some(Ok((data, addr))) => {
135 Some(Ok((data, addr.into_target_addr().ok()?.to_owned())))
136 }
137 Some(Err(e)) => Some(Err(anyhow!(e))),
138 None => None,
139 },
140 Self::ProxySocks(f) => match f.next().await {
141 Some(Ok((data, _))) => Some(Ok((data.data, data.dst_addr))),
142 Some(Err(e)) => Some(Err(anyhow!(e))),
143 None => None,
144 },
145 }
146 }
147
148 #[inline]
149 pub async fn next_timeout(

Callers 12

new_reuseMethod · 0.45
next_timeoutMethod · 0.45
ipv4_to_ipv6Function · 0.45
test_targetFunction · 0.45
test_nat64_asyncFunction · 0.45
get_rendezvous_serverMethod · 0.45
get_version_numberFunction · 0.45
parseMethod · 0.45
resolve_hostMethod · 0.45
get_domainMethod · 0.45
_get_values_of_seat0Function · 0.45
transcribeMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_targetFunction · 0.36
test_nat64_asyncFunction · 0.36