generated from tipragot/rust
Automatic port forwarding using UPnP and invitation link system #27
|
@ -20,9 +20,8 @@ use local_ip_address::local_ip;
|
||||||
/// use bevnet::{Connection, Listener};
|
/// use bevnet::{Connection, Listener};
|
||||||
///
|
///
|
||||||
/// # fn main() -> io::Result<()> {
|
/// # fn main() -> io::Result<()> {
|
||||||
/// let secret_key = Connection::generate_key();
|
/// let listener = Listener::new()?;
|
||||||
/// let listener = Listener::bind("127.0.0.1:23732", &secret_key)?;
|
/// let mut connection = Connection::connect(&listener.connection_string())?;
|
||||||
/// let mut connection = Connection::connect("127.0.0.1:23732", &secret_key)?;
|
|
||||||
///
|
///
|
||||||
/// // The accept operation is not blocking. So we need to loop here.
|
/// // The accept operation is not blocking. So we need to loop here.
|
||||||
/// let mut server_connection;
|
/// let mut server_connection;
|
||||||
|
@ -313,9 +312,8 @@ impl Connection {
|
||||||
/// use bevnet::{Connection, Listener};
|
/// use bevnet::{Connection, Listener};
|
||||||
///
|
///
|
||||||
/// # fn main() -> io::Result<()> {
|
/// # fn main() -> io::Result<()> {
|
||||||
/// let secret_key = Connection::generate_key();
|
/// let listener = Listener::new()?;
|
||||||
/// let listener = Listener::new(&secret_key)?;
|
/// let mut connection = Connection::connect(&listener.connection_string())?;
|
||||||
/// let mut connection = Connection::connect(listener.connection_string())?;
|
|
||||||
///
|
///
|
||||||
/// // The accept operation is not blocking. So we need to loop here.
|
/// // The accept operation is not blocking. So we need to loop here.
|
||||||
/// let mut server_connection;
|
/// let mut server_connection;
|
||||||
|
|
Loading…
Reference in a new issue