Пример #1
0
 public void send(int dstGuid, RPC rpc) throws IOException {
   if (dstGuid != getRemoteUserGUID()) {
     if (T.t) {
       T.debug("Rerouting package " + rpc + " to " + dstGuid);
     }
     route(dstGuid, rpc);
   } else {
     if (!rpc.isInitialized()) {
       rpc.init(
           this); // under certain conditions a rpc can be reused and sent a second time - then
       // it's the first init call that counts. Don't make it twice.
     }
     Packet p = createRPCPacket(rpc);
     if (T.t) {
       T.debug("--> Sending " + rpc + " (" + p.getPos() + " bytes) to " + getRemoteFriend());
     }
     send(p);
   }
 }