JSDoc: Class: Packet

# Class: Packet

## Packet()

#### new Packet()

A generic Packet processing object (extended by two subtypes below).

Source:
  - packets.js, line 57

### Methods

#### (static) fromHeader(header, transport) → {Packet}

Attempt to initialize a new Packet based on the incoming packet header we've received so far. We try each of the types in succession, trying JSON packets first since they are much more common.

##### Parameters:

Name | Type | Description
--- | --- | ---
`header` | string | Packet header string to attempt parsing.
`transport` | DebuggerTransport | Transport instance that will own the packet.

Source:
  - packets.js, line 75

##### Returns:

Parsed packet of the matching type, or null if no types matched.

Type
  Packet