Ejemplo n.º 1
0
 public static Message<ReleaseRequest> ReadReleaseRequest(NetworkBinaryReader dr)
 {
     var relReq = new ReleaseRequest();
     if (relReq.Write().Skip(1).SequenceEqual(dr.Take(9)))
     {
         return new Message<ReleaseRequest> { Payload = relReq, Type = MessageType.PDU };
     }
     //Invalid release request
     throw new Exception("Release request was invalid. Did not match signature.");
 }
Ejemplo n.º 2
0
 public static void SendReleaseRequest(Association asc)
 {
     var req = new ReleaseRequest();
     asc.State = NetworkState.AWAITING_RELEASE_RESPONSE;
     asc.Logger.Log("-->" + req);
     byte[] message = req.Write();
     if ( asc.Stream.CanWrite)
     {
         asc.Stream.Write(message, 0, message.Length);
     }
    
 }
Ejemplo n.º 3
0
 public void RaiseReleaseRequestReceived(ReleaseRequest relReq, Association asc)
 {
     if (ReleaseRequestReceived != null)
     {
         ReleaseRequestReceived(relReq, asc);
     }
 }