Session Layer, Layer 5

Maintains connections and is responsible for controlling ports and sessions. See OSI model, Open Systems Interconnection model.