You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multicast는 내부 통신용인걸까?
멀티캐스트의 목적지 그룹은 244.0.0.0 ~ 239.255.255.255에 속한다고 한다.
그렇다면 예로 들어 12.7.7.7, 28.12.2.3, 91.129.2.2 이 세 개의 호스트가 서로 multicast로 소통하려면 어떻게 개발해야 할까?
319p의 예제 12-1 NonBuffer, 12-2 SmallBuffer, 12-3 FullBuffer는 버퍼가 없으면 성능이 떨어진다는 것을 보여주기 위한 예시다.
그런데 12-1 NonBuffer도 read할 때 커널의 버퍼를 사용하기 때문에 버퍼를 사용하는 예시 아닌가?
mmap을 사용하면 read, write를 호출할 필요가 없기 때문에 성능상 이점이 있는 것으로 책에 나와 있다.(327p)
mmap, read 둘 다 메모리를 읽는다는 점은 똑같은데 mmap이 정말로 성능상 이점이 있을까?
멀티캐스팅을 위한 서버는 기존의 UDP 방식의 서버 프로그래밍과 거의 같으며 클라이언트의 IP를 DatagramPacket에 지정하는 것이 아니라 멀티캐스트 그룹에 해당하는 IP를 지정하는 부분만 다르며, 멀티캐스팅을 위한 클라이언트 역시 기존의 UDP 방식의 클라이언트 프로그래밍과 거의 같으며 다른 점이 있다면 DatagramSocket이 아니라 MulticastSocket을 사용한다는 것과 멀티캐스트 그룹에 참여하기 위한 코드가 추가되는 부분이 신기했다.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
📢 책을 읽으면서 궁금한 점들을 자유롭게 적고 대답해 주세요
6주차 진행 방식
All reactions