1. A lasting connection between a user (or user agent) and a peer, typically a server, usually involving the exchange of many packets between the user's computer and the server. A session is typically implemented as a layer in a network protocol (e.g. telnet, FTP).
In the case of protocols where there is no concept of a session layer (e.g. UDP) or where sessions at the session layer are generally very short-lived (e.g. HTTP), virtual sessions are implemented by having each exchange between the user and the remote host include some form of cookie which stores state (e.g. a unique session ID, information about the user's preferences or authorisation level, etc.).
2. A lasting connection using the session layer of a networking protocol.