1
Instalación en Flutter
Abre la terminal en la raíz de tu proyecto Flutter y descarga el paquete oficial de pub.dev. El paquete hace malabares con la memoria C-ABI automáticamente.
flutter pub add protocol_orzatty
💡 Para que lo entiendas súper fácil: Descargar la librería es como contratar a un intérprete maestro. Tú le hablas en Dart a tu App en el celular, y el traductor agarra tu mensaje y lo dispara cifradísimo por internet.
2
Conectarse al Servidor Orzatty (Nube)
En el Front-end de tu App, tal vez cuando el usuario toque un botón de Iniciar Sesión, crearás el túnel blindado.
import 'package:protocol_orzatty/protocol_orzatty.dart';
// Nos conectamos a la IP de nuestro Servidor Central
final clienteApp = PoClient.connect("203.0.113.50:9091");
print("¡Túnel P2P Cifrado Establecido desde el Teléfono!");
💡 Para que lo entiendas súper fácil: Es como hacer una llamada de espías desde tu celular. Marcas el número (`connect`) y de una sola vez la voz está distorsionada y protegida, sin esperar "certificados" que tarden medios segundos en cargar. Latencia mínima.
3
Enviar Bytes por Flutter
Envía cualquier cosa: un JSON, una imagen en bytes o comandos remotos a través del túnel desde tu app.
import 'package:protocol_orzatty/protocol_orzatty.dart';
// 1. Esto es un array mágico de números binarios en Dart (utf8.encode)
final mensaje = [104, 111, 108, 97]; // 'hola' en números ASCII
// 2. Disparar!
bool esExitoso = clienteApp.send(mensaje);
if (esExitoso) {
print("Se envió directo al núcleo (C++ / Rust) sin errores.");
} else {
print("Rayos, el internet del móvil falló.");
}
// Y cuando el usuario cierre la app:
clienteApp.close();
💡 Para que lo entiendas súper fácil: La app envía una caja sellada. La caja sale de tu celular, rebota en docenas de routers en la internet mundial, y cuando llega a tu servidor, se abre enterita y segura.
1
Installation on Flutter
Open the terminal in the root of your Flutter project and download the official package from pub.dev. The package juggles C-ABI memory automatically for you.
flutter pub add protocol_orzatty
💡 To make it super easy to understand: Downloading the library is like hiring a master interpreter. You speak to your App in Dart, and the interpreter takes your message and shoots it super-encrypted through the internet.
2
Connect to the Orzatty Server (Cloud)
In your App's Front-end, perhaps when the user taps a Login button, you will create the armored tunnel.
import 'package:protocol_orzatty/protocol_orzatty.dart';
// We connect to the IP of our Central Server
final appClient = PoClient.connect("203.0.113.50:9091");
print("E2EE P2P Tunnel Established from Phone!");
💡 To make it super easy to understand: It's like making a spy call from your cell phone. You dial the number (`connect`) and automatically the line is distorted and protected, without waiting for "certificates" taking half seconds to load. Minimal latency.
3
Send Bytes through Flutter
Send anything: a JSON, an image array of bytes, or remote commands through the tunnel from your app.
import 'package:protocol_orzatty/protocol_orzatty.dart';
// 1. This is a magic array of binary numbers in Dart (utf8.encode)
final message = [104, 111, 108, 97]; // 'hola' in ASCII numbers
// 2. Fire!
bool isSuccess = appClient.send(message);
if (isSuccess) {
print("Sent straight to the core (C++ / Rust) without errors.");
} else {
print("Damn, mobile internet failed.");
}
// And when the user closes the app:
appClient.close();