routing

차노·2023년 8월 8일
0

Routing is the process of selecting a path for traffic in a network or between or across multiple networks.

라우팅은 네트워크 내지 다중의 네트워크 상에서 경로의 트래픽을 선택하는 과정이다.

Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public swtiched telephone network, and computer networks, such as the Internet.

전반적으로, 라우팅은 인터넷과 같은 공공 변환된 전화 네트워크, 컴퓨터 네트워크와 같이 회선 변환 네트워크를 포함하여 네트워크의 다양한 상황에서 수행된다

A computer network is made of many machines, called nodes, and paths or links that connect those nodes.

컴퓨터 네트워크는 노드, 경로, 노드를 연결하는 링크라 불리는 수많은 기계들로 만들어졌다.

Communication between two nodes in an interconnected network can take place through many different paths.

상호작용하는 네트워크 상의 두 노드 상의 소통은 서로 다른 경로들을 통해 이루어진다.

Reference

Reference

Reference

++

Route definition takes the following structure:

Where:

  • app is an instance of express.
  • METHOD is an HTTP request method, in lowercase.
  • PATH is a path on the server.
  • HANDLER is the function executed when the route is matched.

+++

Routing refers to how an application's (URLs) respond to client requests to a particular endpoint, which is a URI(Uniform Resource Identifier) (or path) and a specific HTTP request method (GET, POST, and so on.)

라우팅은 애플리케이션이 어떻게 클라이언트 요청에 특정 엔드포인트까지 답하는지를 보여준다.

Each route can have one or more handler functions, which are executed when the route is matched.

각각의 route는 하나 이상의 핸들러 함수를 가지고 있고, 라우트가 적용될 때 실행된다.

These routing methods specify a callback function (sometimes called "handler functions") called when the application receives a request to the specified route (endpoint) and HTTP method.

이러한 라우팅 메서드는 애플리케이션이 특정 route와 http method로 요청을 받을 때 불리는 콜백 함수를 특정짓는다.

In other words, the appliation listns for requests that match the specified route(s) and method(s), and wehn it detects a match, it calls the specified callback function.

In fact, the routing methods can have more than one callbck funcition as arguments. With multiple callback functions, it is important to provide next as an argument to the callback function and then call next() within the body of the funtion to hand off control to the next callback.

0개의 댓글