Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkts-core/src/main/java/io/pkts/framer/FramingException.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

import io.pkts.protocol.Protocol;

/**
* A custom runtime exception specifically designed for handling protocol framing errors in the Pkts networking library.
* The FramingException captures both an error message and the associated Protocol, providing detailed context for network protocol framing issues.
* It extends RuntimeException and includes a constructor that takes a message and protocol, with a getter method
* to retrieve the specific protocol where the framing error occurred. This exception enhances error handling and
* debugging by allowing developers to precisely identify and diagnose protocol-level framing problems during network packet processing.
*/

public class FramingException extends RuntimeException {
private final Protocol protocol;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
import io.pkts.buffer.Buffers;
import io.pkts.packet.sip.header.ExpiresHeader;

/**
* ExpiresHeaderImpl is a specialized SIP header implementation for managing session expiration times in network communication.
* It extends SipHeaderImpl and implements the ExpiresHeader interface, providing a concrete mechanism to store and retrieve expiration values for SIP sessions.
* The class offers methods to create, access, and clone expiration headers, with a core focus on representing the integer-based expires time for SIP communication protocols.
* It supports basic header manipulation by storing an expires value and allowing retrieval and duplication of that value,
* facilitating session timeout and lifecycle management in SIP-based network interactions."
*/

public class ExpiresHeaderImpl extends SipHeaderImpl implements ExpiresHeader {

private int expires;
Expand Down