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

Function new_udp

libs/hbb_common/src/socket_client.rs:186–201  ·  view source on GitHub ↗
(local: T, ms_timeout: u64)

Source from the content-addressed store, hash-verified

184}
185
186async fn new_udp<T: ToSocketAddrs>(local: T, ms_timeout: u64) -> ResultType<FramedSocket> {
187 match Config::get_socks() {
188 None => Ok(FramedSocket::new(local).await?),
189 Some(conf) => {
190 let socket = FramedSocket::new_proxy(
191 conf.proxy.as_str(),
192 local,
193 conf.username.as_str(),
194 conf.password.as_str(),
195 ms_timeout,
196 )
197 .await?;
198 Ok(socket)
199 }
200 }
201}
202
203pub async fn rebind_udp_for(
204 target: &str,

Callers 1

new_udp_forFunction · 0.85

Calls 1

as_strMethod · 0.80

Tested by

no test coverage detected