Ejemplo n.º 1
0
 public NetReplication(int port = 0)
 {
     System = new ReplicationSystem();
     BroadcastStreamWriter = System.CreateStreamWriter(ReplicationStreamWriterOptions.AllowOnlyAlwaysUpdate);
     NetManager            = new NetManager(this);
     NetManager.Start(port);
 }
Ejemplo n.º 2
0
        internal NetReplicationPeer(NetReplication replication, NetPeer peer)
        {
            Replication = replication;
            NetPeer     = peer;

            ReliableStreamWriter = replication.System.CreateStreamWriter(ReplicationStreamWriterOptions.AllowAllExceptAlwaysUpdate);
        }
Ejemplo n.º 3
0
 public static void WriteTo(this IReplicationStreamWriter master, IReplicationStreamReader slave)
 {
     using (MemoryStream stream = new MemoryStream())
     {
         master.WriteTo(stream);
         stream.Seek(0, SeekOrigin.Begin);
         slave.ReadFrom(stream);
     }
 }
Ejemplo n.º 4
0
 public static void WriteTo(this IReplicationStreamWriter master, ReplicationSystem system)
 {
     master.WriteTo(system.DefaultStreamReader);
 }