Lines Matching refs:new

108         let mut tr = Transaction::new(TransactionConfig {  in perform_transaction()
155 async fn new(config: ClientConfig) -> Result<Self> { in new() method
162 Arc::new(Net::new(None)) in new()
166 String::new() in new()
178 String::new() in new()
193 username: Username::new(ATTR_USERNAME, config.username), in new()
195 realm: Realm::new(ATTR_REALM, config.realm), in new()
196 software: Software::new(ATTR_SOFTWARE, config.software), in new()
197 tr_map: Arc::new(Mutex::new(TransactionMap::new())), in new()
198 binding_mgr: Arc::new(Mutex::new(BindingManager::new())), in new()
204 integrity: MessageIntegrity::new_short_term_integrity(String::new()), in new()
205 read_ch_tx: Arc::new(Mutex::new(None)), in new()
310 let mut msg = Message::new(); in handle_stun_message()
326 from = SocketAddr::new(peer_addr.ip, peer_addr.port); in handle_stun_message()
441 Box::new(TransactionId::new()), in send_binding_request_to()
442 Box::new(BINDING_REQUEST), in send_binding_request_to()
443 Box::new(self.software.clone()), in send_binding_request_to()
446 vec![Box::new(TransactionId::new()), Box::new(BINDING_REQUEST)] in send_binding_request_to()
449 let mut msg = Message::new(); in send_binding_request_to()
460 Ok(SocketAddr::new(refl_addr.ip, refl_addr.port)) in send_binding_request_to()
493 let mut msg = Message::new(); in allocate()
495 Box::new(TransactionId::new()), in allocate()
496 Box::new(MessageType::new(METHOD_ALLOCATE, CLASS_REQUEST)), in allocate()
497 Box::new(RequestedTransport { in allocate()
500 Box::new(FINGERPRINT), in allocate()
521 Box::new(TransactionId::new()), in allocate()
522 Box::new(MessageType::new(METHOD_ALLOCATE, CLASS_REQUEST)), in allocate()
523 Box::new(RequestedTransport { in allocate()
526 Box::new(self.username.clone()), in allocate()
527 Box::new(self.realm.clone()), in allocate()
528 Box::new(nonce.clone()), in allocate()
529 Box::new(self.integrity.clone()), in allocate()
530 Box::new(FINGERPRINT), in allocate()
552 let relayed_addr = SocketAddr::new(relayed.ip, relayed.port); in allocate()
571 read_ch_rx: Arc::new(Mutex::new(read_ch_rx)), in allocate()
583 pub async fn new(config: ClientConfig) -> Result<Self> { in new() method
584 let ci = ClientInternal::new(config).await?; in new()
586 client_internal: Arc::new(Mutex::new(ci)), in new()
601 Ok(RelayConn::new(Arc::clone(&self.client_internal), config).await) in allocate()