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