server handshake gui
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::P2PSharedData;
|
||||
use crate::cryptographic_signature::CryptographicSignature;
|
||||
use crate::message_handling::EventType;
|
||||
use crate::message_handling::handle_recevied_message;
|
||||
@@ -111,17 +112,11 @@ impl MultipleSenders {
|
||||
});
|
||||
}*/
|
||||
|
||||
pub fn start_receving_thread(
|
||||
socket: &Arc<UdpSocket>,
|
||||
messages_list: &Arc<Mutex<HashMap<i32, EventType>>>,
|
||||
crypto_pair: &Arc<CryptographicSignature>,
|
||||
socket_addr: SocketAddr,
|
||||
senders: &Arc<MultipleSenders>,
|
||||
) {
|
||||
let sock_clone = Arc::clone(socket);
|
||||
let cryptopair_clone = Arc::clone(crypto_pair);
|
||||
let senders_clone = Arc::clone(senders);
|
||||
let messages_clone = Arc::clone(messages_list);
|
||||
pub fn start_receving_thread(shared_data: &P2PSharedData, socket_addr: SocketAddr) {
|
||||
let sock_clone = shared_data.socket();
|
||||
let cryptopair_clone = shared_data.cryptopair();
|
||||
let senders_clone = shared_data.senders();
|
||||
let messages_clone = shared_data.messages_list();
|
||||
thread::spawn(move || {
|
||||
let mut buf = [0u8; 1024];
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user