projects
/
crypto_lab1.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Read and writing of packet, work in progress.
[crypto_lab1.git]
/
src
/
client.rs
diff --git
a/src/client.rs
b/src/client.rs
index
8392460
..
575df05
100644
(file)
--- a/
src/client.rs
+++ b/
src/client.rs
@@
-1,10
+1,8
@@
use std::io::{ TcpStream, IoResult };
use command::{ Command, Packet, Error };
use std::io::{ TcpStream, IoResult };
use command::{ Command, Packet, Error };
-use crypto::Crypto;
pub struct Client {
socket: TcpStream,
pub struct Client {
socket: TcpStream,
- crypto: Crypto,
current_timestamp: u64
}
current_timestamp: u64
}
@@
-12,8
+10,7
@@
impl Client {
pub fn new(address: &str, port: u16) -> IoResult<Client> {
Ok(Client {
socket: try!(TcpStream::connect(address, port)),
pub fn new(address: &str, port: u16) -> IoResult<Client> {
Ok(Client {
socket: try!(TcpStream::connect(address, port)),
- current_timestamp: 0,
- crypto: Crypto::new()
+ current_timestamp: 0
})
}
})
}
@@
-24,7
+21,7
@@
impl Client {
pub fn start_tests(&mut self) {
pub fn start_tests(&mut self) {
- let command = Packet::new
RandomC
ommand(self.current_timestamp);
+ let command = Packet::new
_random_c
ommand(self.current_timestamp);
self.send(command);
}
self.send(command);
}