Ejemplo n.º 1
0
 public static void SendReleaseResponse(Association asc)
 {
     var resp = new ReleaseResponse();
     asc.Logger.Log("-->" + resp);
     byte[] message = resp.Write();
     if (asc.Stream.CanWrite)
     {
         asc.Stream.Write(message, 0, message.Length);
     }
 }
Ejemplo n.º 2
0
 public static Message<ReleaseResponse> ReadReleaseResponse(NetworkBinaryReader dr)
 {
     var relRes = new ReleaseResponse();
     if (relRes.Write().Skip(1).SequenceEqual(dr.Take(9)))
     {
         return new Message<ReleaseResponse> { Payload = relRes, Type = MessageType.PDU };
     }
     //Invalid release response
     throw new Exception("Release response was invalid. Did not match signature.");
 }