Vehicular delay-tolerant networks (VDTNs) are introduced for communications between traffic sources and sinks, in which direct end-to-end connection is not available. In this VDTN, mobile routers installed on the vehicles are used as carriers to carry data from traffic sources to sinks. We first present the optimization formulation based on the constrained Markov decision process (CMDP) to obtain an optimal decision for the mobile router on whether to accept packets from a traffic source. This decision is made to maximize the reward of data delivery while the quality-of-service (QoS) performance is guaranteed. Then, the noncooperative game and optimization formulations are presented for the cases when traffic sources have a self-interest to maximize their own benefit and a global interest to maximize the total benefit of the network, respectively. From the performance evaluation, a mobile router with CMDP optimization can achieve the highest reward while the maximum packet-blocking probability requirement is met. With noncooperative game formulation for the traffic sources, the Nash equilibrium can be obtained. Alternatively, if the traffic sources are cooperative, the largest total benefit of the network can be achieved.