Delay-tolerant networking)DTN), is a kind of wireless networks that permanent connection between nodes does not exist due to their low density and dispersion. Since in traditional TCP/IP networks there is an end-to-end path between each pairs of source and destination, any other conflicting situation is considered as an application for DTN networks. In DTN networks, routing is basically done by saveing, carrying and sending, Additionally communication between nodes is changing over time. So far, considerable research has been done in the field of routing in DTN networks. on the other, routing in DTN networks can be divided into two categories: with considering social relations and without considering social relations. Due to the fact that in the routing without considering social relations nodes does not have any information about destination, many related methods are sending the message as flooding into the network that lead to improper use of network resources (such as bandwidth, buffer and energy). On the other hand, in methods in the routing without considering social relations, social features of individuals( such as centrality, similarity and friendship) have been used for routing operations. Today, with due attention to expansion the use of smart portable devices such as cell phones and laptops and increasing popularity of social applications such as Facebook, LinkedIn and Line, routing methods with considering social relations in DTN networks have been particularly. On the other hand, in DTN networks, some nodes may not participate in delivering other messages due to lack of storage space and device energy (battery). They may refuse to receive or relay massages from other nodes; These nodes are called to as selfish nodes.In addition, in the most routing algorithms in DTN networks, buffer congestion is not considered. It is obvious that the existence of selfish nodes in routing and not paying attention to buffer congestion in DTN networks can cause to reduce network's performance. In order to reduce the problems, in the mentioned problems, in this thesis, CASASR algorithm is presented that is a routing algorithm with considering social relations. This algorithm is designed by considering social parameters such as degree centrality and social dependence, and buffer congestion and selfish nodes are also taken into account. In order to evaluate performance of the proposed method, CASASR has been compared with DTN well-known routing algorithms by transmission ratios, overhead transfer, transmission delay, and average number of steps.The results of simulation represents that CASASR has better efficiency in transmission ratio and overhead transmission in comparison with other related algorithms. Keywords: Delay-tolerant networking, DTN, routing based on social relations, aware of selfishness, aware of buffer congestion.