net lib
This commit is contained in:
parent
fdc4bfe2d7
commit
b8b9235c4e
|
@ -3,11 +3,10 @@ name = "pbtc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcrypto 0.1.0",
|
"bitcrypto 0.1.0",
|
||||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"chain 0.1.0",
|
"chain 0.1.0",
|
||||||
"keys 0.1.0",
|
"keys 0.1.0",
|
||||||
|
"net 0.1.0",
|
||||||
"primitives 0.1.0",
|
"primitives 0.1.0",
|
||||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"script 0.1.0",
|
"script 0.1.0",
|
||||||
"serialization 0.1.0",
|
"serialization 0.1.0",
|
||||||
]
|
]
|
||||||
|
@ -98,6 +97,14 @@ name = "libc"
|
||||||
version = "0.2.16"
|
version = "0.2.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "net"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serialization 0.1.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nodrop"
|
name = "nodrop"
|
||||||
version = "0.1.8"
|
version = "0.1.8"
|
||||||
|
|
|
@ -4,12 +4,10 @@ version = "0.1.0"
|
||||||
authors = ["debris <marek.kotewicz@gmail.com>"]
|
authors = ["debris <marek.kotewicz@gmail.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = "0.5"
|
|
||||||
rustc-serialize = "0.3"
|
|
||||||
|
|
||||||
bitcrypto = { path = "crypto" }
|
bitcrypto = { path = "crypto" }
|
||||||
chain = { path = "chain" }
|
chain = { path = "chain" }
|
||||||
keys = { path = "keys" }
|
keys = { path = "keys" }
|
||||||
|
net = { path = "net" }
|
||||||
primitives = { path = "primitives" }
|
primitives = { path = "primitives" }
|
||||||
script = { path = "script" }
|
script = { path = "script" }
|
||||||
serialization = { path = "serialization" }
|
serialization = { path = "serialization" }
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
[package]
|
||||||
|
name = "net"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["debris <marek.kotewicz@gmail.com>"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
byteorder = "0.5"
|
||||||
|
|
||||||
|
serialization = { path = "../serialization" }
|
||||||
|
|
|
@ -4,7 +4,7 @@ use ser::{
|
||||||
Stream, Serializable,
|
Stream, Serializable,
|
||||||
Reader, Deserializable, Error as ReaderError
|
Reader, Deserializable, Error as ReaderError
|
||||||
};
|
};
|
||||||
use net::ServiceFlags;
|
use ServiceFlags;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub struct Port(u16);
|
pub struct Port(u16);
|
||||||
|
@ -120,7 +120,7 @@ impl Deserializable for NetAddress {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use ser::{serialize, deserialize};
|
use ser::{serialize, deserialize};
|
||||||
use net::ServiceFlags;
|
use ServiceFlags;
|
||||||
use super::NetAddress;
|
use super::NetAddress;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
|
@ -1,3 +1,6 @@
|
||||||
|
extern crate byteorder;
|
||||||
|
extern crate serialization as ser;
|
||||||
|
|
||||||
mod address;
|
mod address;
|
||||||
mod service;
|
mod service;
|
||||||
|
|
|
@ -10,17 +10,10 @@
|
||||||
//! serialization(primitives)
|
//! serialization(primitives)
|
||||||
//! primitives
|
//! primitives
|
||||||
|
|
||||||
extern crate byteorder;
|
|
||||||
extern crate rustc_serialize;
|
|
||||||
|
|
||||||
extern crate bitcrypto as crypto;
|
extern crate bitcrypto as crypto;
|
||||||
extern crate chain;
|
extern crate chain;
|
||||||
extern crate keys;
|
extern crate keys;
|
||||||
|
extern crate net;
|
||||||
extern crate primitives;
|
extern crate primitives;
|
||||||
extern crate script;
|
extern crate script;
|
||||||
extern crate serialization as ser;
|
extern crate serialization as ser;
|
||||||
|
|
||||||
pub mod net;
|
|
||||||
|
|
||||||
pub use rustc_serialize::hex;
|
|
||||||
pub use primitives::{hash, bytes};
|
|
||||||
|
|
Loading…
Reference in New Issue