UDP Hole-punching을 이용한 P2P 화상/음성 통신 소스(NAT지원)
*현*
다운로드
장바구니
소개글
< 등록 자료의 간단한 설명>이 자료는 UDP Hole-Punching 기법을 이용하여 서로 다른 Nat내에 있는 Peer끼리의 통신을 구현한 소스입니다.
- client와 server간에는 TCP/UDP 통신 모두 가능합니다.
client와 client간에는 UDP 통신을 합니다.
- client의 송수신 데이터는 큐구조로 각각의 스레드에서 관리하며, 프로토콜 변경으로 채팅, 파일전송 등으로 기능을 쉽게 확장할 수 있습니다. 그리고 p2p 통신이 아닌 client/server 구조를 사용하신다면 udp/tcp 모두 client를 확장하여 client와 server간에 다중 소켓을 사용할 수 있습니다.
- server의 경우 iocp 기술을 사용하였으며, 현재의 중계서버로서의 역할뿐 아니라 다른 기능의 서버로 확장가능합니다.
기본적인 시스템의 구조는 아래에서 확인할 수 있습니다.
http://blog.naver.com/khjjong/10035959537
1:1 영상/음성 통신을 기본으로 하며, 본 소스를 확장하여 1:6까지 구현하여 테스트 해보았습니다.(단, 본 소스내에는 1:N 통신에 대한 구현은 없습니다.)
항시 Peer를 관리하는 중계 서버가 존재하여야 하며, Peer간의 통신에는 중계서버는 관여를
하지 않습니다.
간략한 기능 설명은 아래와 같습니다.
- TCP/UDP C/S 통신
- UDP Hole-punching 기법을 이용한 peer-to-peer 통신(일부 nat 환명 미지원)
- 영상/음성 1:1 송/수신(음성:GSM610, 영상:wmv9)
- 음성 전송 품질, 영상 전송 프레임 조절
- 화면 캡쳐
위에 설명처럼 일부 Nat 환경은 지원하지 못합니다.
Symmetric Cone 이나 Multi-Nat 경우 이 번 구현 대상에서는 제외 하였습니다.
Symmetric Conedml 경우는 우리가 일반적으로 알고 있는 공유기는 사용하지 않는 것으로
알고 있습니다. 그리고 Multi-Nat(Nat안에 Nat 경우)의 경우도 우리나라의 경우
대기업이나 학교 등 보안등을 위하여 또다른 커다란 Lan망을 만든 경우가 아니라면
없을 듯 하여 제외하였습니다. 차후 좀 더 많고 유연하게 Nat 환경을 지원하기 위해서는
위의 두 가지 경우도 고려하여 업데이트 할 예정입니다. 참고하시기 바랍니다.
이외 제품 구입 후 참고해야할 부분에 대한 설명은 /doc 디렉토리 안에 참고 서적.doc 문서를 참고하시면 됩니다.
컴파일 실행환경
win2000/2003/xp 등,wmv9, Visual Studio 6.0 C++, MFC, MSSDK압축파일 내 파일목록
doc/Thumbs.db
doc/~$참고 사항 .doc
doc/참고 사항 .doc
doc/화상솔루션 기본 스펙.ppt
doc/참고문서/KissSpring01_RTP.pdf
doc/참고문서/Network Address Translation .doc
doc/참고문서/p2pnat.pdf
doc/참고문서/PP2PSUDP[1].pdf
doc/참고문서/TCP Connections for P2P Apps.pdf
doc/참고문서/UDP 홀 펀칭을 응용한 SNMP기반의 NAT 환경 단말.pdf
doc/참고문서/고속 네트워크를 위한 비동기 UDP.pdf
doc/참고문서/공유기 hole_punching 해결.txt
NaviLive/AVManager.cpp
NaviLive/AVManager.h
NaviLive/CallAcceptDlg.cpp
NaviLive/CallAcceptDlg.h
NaviLive/Debug/
NaviLive/ImageFormat.cpp
NaviLive/ImageFormat.h
NaviLive/LoginDlg.cpp
NaviLive/LoginDlg.h
NaviLive/MainManagerDlg.cpp
NaviLive/MainManagerDlg.h
NaviLive/MessageBox.cpp
NaviLive/MessageBox.h
NaviLive/NaviLive.aps
NaviLive/NaviLive.clw
NaviLive/NaviLive.cpp
NaviLive/NaviLive.dsp
NaviLive/NaviLive.dsw
NaviLive/NaviLive.h
NaviLive/NaviLive.ncb
NaviLive/NaviLive.opt
NaviLive/NaviLive.plg
NaviLive/NaviLive.rc
NaviLive/NaviLiveDlg.cpp
NaviLive/NaviLiveDlg.h
NaviLive/ReadMe.txt
NaviLive/resource.h
NaviLive/StdAfx.cpp
NaviLive/StdAfx.h
NaviLive/UserListMg.cpp
NaviLive/UserListMg.h
NaviLive/common/datadefine.h
NaviLive/common/DataQueue.cpp
NaviLive/common/DataQueue.h
NaviLive/common/Debug/
NaviLive/common/IniFile.cpp
NaviLive/common/IniFile.h
NaviLive/common/Markup.cpp
NaviLive/common/Markup.h
NaviLive/common/Thread.cpp
NaviLive/common/Thread.h
NaviLive/common/UserList.cpp
NaviLive/common/UserList.h
NaviLive/common/Mixer/MemDC.h
NaviLive/common/Mixer/MixerBase.cpp
NaviLive/common/Mixer/MixerBase.h
NaviLive/common/Mixer/MixerClasses.h
NaviLive/common/Mixer/MixerFader.cpp
NaviLive/common/Mixer/MixerFader.h
NaviLive/common/Mixer/MixerNumber.cpp
NaviLive/common/Mixer/MixerNumber.h
NaviLive/common/Mixer/MixerPeakMeter.cpp
NaviLive/common/Mixer/MixerPeakMeter.h
NaviLive/common/Mixer/MixerSwitch.cpp
NaviLive/common/Mixer/MixerSwitch.h
NaviLive/lib/JpegLib.lib
NaviLive/lib/JpegLibd.lib
NaviLive/lib/NaviAVLib.lib
NaviLive/lib/NaviAVLibD.lib
NaviLive/lib/NaviImgLib.lib
NaviLive/lib/NaviImgLibd.lib
NaviLive/lib/NaviNetLib.lib
NaviLive/lib/NaviNetLibD.lib
NaviLive/NaviAVLib/ACManager.cpp
NaviLive/NaviAVLib/ACManager.h
NaviLive/NaviAVLib/AVBase.cpp
NaviLive/NaviAVLib/AVBase.h
NaviLive/NaviAVLib/AVIn.cpp
NaviLive/NaviAVLib/AVIn.h
NaviLive/NaviAVLib/AVOut.cpp
NaviLive/NaviAVLib/AVOut.h
NaviLive/NaviAVLib/NaviAVLib.dsp
NaviLive/NaviAVLib/NaviAVLib.plg
NaviLive/NaviAVLib/NaviVidCap.cpp
NaviLive/NaviAVLib/NaviVidCap.h
NaviLive/NaviAVLib/Readme.txt
NaviLive/NaviAVLib/StdAfx.cpp
NaviLive/NaviAVLib/StdAfx.h
NaviLive/NaviAVLib/VCManager.cpp
NaviLive/NaviAVLib/VCManager.h
NaviLive/NaviImgLib/BmpCoder.h
NaviLive/NaviImgLib/GifCoder.h
NaviLive/NaviImgLib/Image.h
NaviLive/NaviImgLib/ImageGeometry.h
NaviLive/NaviImgLib/jconfig.h
NaviLive/NaviImgLib/jmorecfg.h
NaviLive/NaviImgLib/JpegCoder.h
NaviLive/NaviImgLib/jpeglib.h
NaviLive/NaviImgLib/JpegLib.lib
NaviLive/NaviImgLib/JpegLibd.lib
NaviLive/NaviImgLib/NaviImgLib.lib
NaviLive/NaviImgLib/NaviImgLibd.lib
NaviLive/NaviNetLib/AliveCheckThread.cpp
NaviLive/NaviNetLib/AliveCheckThread.h
NaviLive/NaviNetLib/ConnectTryThread.cpp
NaviLive/NaviNetLib/ConnectTryThread.h
NaviLive/NaviNetLib/KeepSessionThread.cpp
NaviLive/NaviNetLib/KeepSessionThread.h
NaviLive/NaviNetLib/ListenSocket.cpp
NaviLive/NaviNetLib/ListenSocket.h
NaviLive/NaviNetLib/NaviNetLib.dsp
NaviLive/NaviNetLib/NaviNetLib.plg
NaviLive/NaviNetLib/NaviSocket.cpp
NaviLive/NaviNetLib/NaviSocket.h
NaviLive/NaviNetLib/Readme.txt
NaviLive/NaviNetLib/SendingThread.cpp
NaviLive/NaviNetLib/SendingThread.h
NaviLive/NaviNetLib/SendThread.cpp
NaviLive/NaviNetLib/SendThread.h
NaviLive/NaviNetLib/Session.cpp
NaviLive/NaviNetLib/Session.h
NaviLive/NaviNetLib/SessionManager.cpp
NaviLive/NaviNetLib/SessionManager.h
NaviLive/NaviNetLib/StdAfx.cpp
NaviLive/NaviNetLib/StdAfx.h
NaviLive/NaviNetLib/TCPSession.cpp
NaviLive/NaviNetLib/TCPSession.h
NaviLive/NaviNetLib/TCPSocket.cpp
NaviLive/NaviNetLib/TCPSocket.h
NaviLive/NaviNetLib/UDPRecvThread.cpp
NaviLive/NaviNetLib/UDPRecvThread.h
NaviLive/NaviNetLib/UDPSession.cpp
NaviLive/NaviNetLib/UDPSession.h
NaviLive/NaviNetLib/UdpSocket.cpp
NaviLive/NaviNetLib/UdpSocket.h
NaviLive/res/NaviLive.ico
NaviLive/res/NaviLive.rc2
Server/include/BufferPool.h
Server/include/ClientSocket.h
Server/include/DataDefine.h
Server/include/DataQueue.h
Server/include/Debug/
Server/include/EzTalkDefine.h
Server/include/LogWrite.h
Server/include/Receiver.h
Server/include/Server.h
Server/include/Service.h
Server/lib/LibServer.lib
Server/lib/LibServerD.lib
Server/RelayServer/DebugLog_2008_08_27.log
Server/RelayServer/EZTClient.cpp
Server/RelayServer/EZTClient.h
Server/RelayServer/EZTReceiver.cpp
Server/RelayServer/EZTReceiver.h
Server/RelayServer/EZTServer.cpp
Server/RelayServer/EZTServer.h
Server/RelayServer/LogWrite.cpp
Server/RelayServer/LogWrite.h
Server/RelayServer/ReadMe.txt
Server/RelayServer/RelayServer.aps
Server/RelayServer/RelayServer.clw
Server/RelayServer/RelayServer.cpp
Server/RelayServer/RelayServer.dsp
Server/RelayServer/RelayServer.dsw
Server/RelayServer/RelayServer.h
Server/RelayServer/RelayServer.ncb
Server/RelayServer/RelayServer.opt
Server/RelayServer/RelayServer.plg
Server/RelayServer/RelayServer.rc
Server/RelayServer/RelayServerDlg.cpp
Server/RelayServer/RelayServerDlg.h
Server/RelayServer/resource.h
Server/RelayServer/SkinBtn.cpp
Server/RelayServer/SkinBtn.h
Server/RelayServer/StdAfx.cpp
Server/RelayServer/StdAfx.h
Server/RelayServer/SysInfoDlg.cpp
Server/RelayServer/SysInfoDlg.h
Server/RelayServer/UserList.cpp
Server/RelayServer/UserList.h
Server/RelayServer/Pdh/Debug/
Server/RelayServer/Pdh/perfmon.cpp
Server/RelayServer/Pdh/perfmon.h
Server/RelayServer/res/Debug/
Server/RelayServer/res/MP_PLAYER_BACK.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_DISABLE.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_DOWN.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_FOCUS.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_UP.bmp
Server/RelayServer/res/RelayServer.ico
Server/RelayServer/res/RelayServer.rc2
Server/RelayServer/res/start_disable.bmp
Server/RelayServer/res/start_down.bmp
Server/RelayServer/res/start_focus.bmp
Server/RelayServer/res/start_up.bmp
Server/RelayServer/res/stop_disable.bmp
Server/RelayServer/res/stop_down.bmp
Server/RelayServer/res/stop_focus.bmp
Server/RelayServer/res/stop_up.bmp
Server/RelayServer/res/Syncway.ico
Server/RelayServer/res/title_bt_hide_disable.bmp
Server/RelayServer/res/title_bt_hide_dn.bmp
Server/RelayServer/res/title_bt_hide_over.bmp
Server/RelayServer/res/title_bt_hide_up.bmp
Server/RelayServer/res/vod1.ico
Server/RelayServer/res/WIN2000_TITLEBAR_160X120_XBUTTON.bmp
V_CODEC/wmv9VCMsetup.exe
doc/~$참고 사항 .doc
doc/참고 사항 .doc
doc/화상솔루션 기본 스펙.ppt
doc/참고문서/KissSpring01_RTP.pdf
doc/참고문서/Network Address Translation .doc
doc/참고문서/p2pnat.pdf
doc/참고문서/PP2PSUDP[1].pdf
doc/참고문서/TCP Connections for P2P Apps.pdf
doc/참고문서/UDP 홀 펀칭을 응용한 SNMP기반의 NAT 환경 단말.pdf
doc/참고문서/고속 네트워크를 위한 비동기 UDP.pdf
doc/참고문서/공유기 hole_punching 해결.txt
NaviLive/AVManager.cpp
NaviLive/AVManager.h
NaviLive/CallAcceptDlg.cpp
NaviLive/CallAcceptDlg.h
NaviLive/Debug/
NaviLive/ImageFormat.cpp
NaviLive/ImageFormat.h
NaviLive/LoginDlg.cpp
NaviLive/LoginDlg.h
NaviLive/MainManagerDlg.cpp
NaviLive/MainManagerDlg.h
NaviLive/MessageBox.cpp
NaviLive/MessageBox.h
NaviLive/NaviLive.aps
NaviLive/NaviLive.clw
NaviLive/NaviLive.cpp
NaviLive/NaviLive.dsp
NaviLive/NaviLive.dsw
NaviLive/NaviLive.h
NaviLive/NaviLive.ncb
NaviLive/NaviLive.opt
NaviLive/NaviLive.plg
NaviLive/NaviLive.rc
NaviLive/NaviLiveDlg.cpp
NaviLive/NaviLiveDlg.h
NaviLive/ReadMe.txt
NaviLive/resource.h
NaviLive/StdAfx.cpp
NaviLive/StdAfx.h
NaviLive/UserListMg.cpp
NaviLive/UserListMg.h
NaviLive/common/datadefine.h
NaviLive/common/DataQueue.cpp
NaviLive/common/DataQueue.h
NaviLive/common/Debug/
NaviLive/common/IniFile.cpp
NaviLive/common/IniFile.h
NaviLive/common/Markup.cpp
NaviLive/common/Markup.h
NaviLive/common/Thread.cpp
NaviLive/common/Thread.h
NaviLive/common/UserList.cpp
NaviLive/common/UserList.h
NaviLive/common/Mixer/MemDC.h
NaviLive/common/Mixer/MixerBase.cpp
NaviLive/common/Mixer/MixerBase.h
NaviLive/common/Mixer/MixerClasses.h
NaviLive/common/Mixer/MixerFader.cpp
NaviLive/common/Mixer/MixerFader.h
NaviLive/common/Mixer/MixerNumber.cpp
NaviLive/common/Mixer/MixerNumber.h
NaviLive/common/Mixer/MixerPeakMeter.cpp
NaviLive/common/Mixer/MixerPeakMeter.h
NaviLive/common/Mixer/MixerSwitch.cpp
NaviLive/common/Mixer/MixerSwitch.h
NaviLive/lib/JpegLib.lib
NaviLive/lib/JpegLibd.lib
NaviLive/lib/NaviAVLib.lib
NaviLive/lib/NaviAVLibD.lib
NaviLive/lib/NaviImgLib.lib
NaviLive/lib/NaviImgLibd.lib
NaviLive/lib/NaviNetLib.lib
NaviLive/lib/NaviNetLibD.lib
NaviLive/NaviAVLib/ACManager.cpp
NaviLive/NaviAVLib/ACManager.h
NaviLive/NaviAVLib/AVBase.cpp
NaviLive/NaviAVLib/AVBase.h
NaviLive/NaviAVLib/AVIn.cpp
NaviLive/NaviAVLib/AVIn.h
NaviLive/NaviAVLib/AVOut.cpp
NaviLive/NaviAVLib/AVOut.h
NaviLive/NaviAVLib/NaviAVLib.dsp
NaviLive/NaviAVLib/NaviAVLib.plg
NaviLive/NaviAVLib/NaviVidCap.cpp
NaviLive/NaviAVLib/NaviVidCap.h
NaviLive/NaviAVLib/Readme.txt
NaviLive/NaviAVLib/StdAfx.cpp
NaviLive/NaviAVLib/StdAfx.h
NaviLive/NaviAVLib/VCManager.cpp
NaviLive/NaviAVLib/VCManager.h
NaviLive/NaviImgLib/BmpCoder.h
NaviLive/NaviImgLib/GifCoder.h
NaviLive/NaviImgLib/Image.h
NaviLive/NaviImgLib/ImageGeometry.h
NaviLive/NaviImgLib/jconfig.h
NaviLive/NaviImgLib/jmorecfg.h
NaviLive/NaviImgLib/JpegCoder.h
NaviLive/NaviImgLib/jpeglib.h
NaviLive/NaviImgLib/JpegLib.lib
NaviLive/NaviImgLib/JpegLibd.lib
NaviLive/NaviImgLib/NaviImgLib.lib
NaviLive/NaviImgLib/NaviImgLibd.lib
NaviLive/NaviNetLib/AliveCheckThread.cpp
NaviLive/NaviNetLib/AliveCheckThread.h
NaviLive/NaviNetLib/ConnectTryThread.cpp
NaviLive/NaviNetLib/ConnectTryThread.h
NaviLive/NaviNetLib/KeepSessionThread.cpp
NaviLive/NaviNetLib/KeepSessionThread.h
NaviLive/NaviNetLib/ListenSocket.cpp
NaviLive/NaviNetLib/ListenSocket.h
NaviLive/NaviNetLib/NaviNetLib.dsp
NaviLive/NaviNetLib/NaviNetLib.plg
NaviLive/NaviNetLib/NaviSocket.cpp
NaviLive/NaviNetLib/NaviSocket.h
NaviLive/NaviNetLib/Readme.txt
NaviLive/NaviNetLib/SendingThread.cpp
NaviLive/NaviNetLib/SendingThread.h
NaviLive/NaviNetLib/SendThread.cpp
NaviLive/NaviNetLib/SendThread.h
NaviLive/NaviNetLib/Session.cpp
NaviLive/NaviNetLib/Session.h
NaviLive/NaviNetLib/SessionManager.cpp
NaviLive/NaviNetLib/SessionManager.h
NaviLive/NaviNetLib/StdAfx.cpp
NaviLive/NaviNetLib/StdAfx.h
NaviLive/NaviNetLib/TCPSession.cpp
NaviLive/NaviNetLib/TCPSession.h
NaviLive/NaviNetLib/TCPSocket.cpp
NaviLive/NaviNetLib/TCPSocket.h
NaviLive/NaviNetLib/UDPRecvThread.cpp
NaviLive/NaviNetLib/UDPRecvThread.h
NaviLive/NaviNetLib/UDPSession.cpp
NaviLive/NaviNetLib/UDPSession.h
NaviLive/NaviNetLib/UdpSocket.cpp
NaviLive/NaviNetLib/UdpSocket.h
NaviLive/res/NaviLive.ico
NaviLive/res/NaviLive.rc2
Server/include/BufferPool.h
Server/include/ClientSocket.h
Server/include/DataDefine.h
Server/include/DataQueue.h
Server/include/Debug/
Server/include/EzTalkDefine.h
Server/include/LogWrite.h
Server/include/Receiver.h
Server/include/Server.h
Server/include/Service.h
Server/lib/LibServer.lib
Server/lib/LibServerD.lib
Server/RelayServer/DebugLog_2008_08_27.log
Server/RelayServer/EZTClient.cpp
Server/RelayServer/EZTClient.h
Server/RelayServer/EZTReceiver.cpp
Server/RelayServer/EZTReceiver.h
Server/RelayServer/EZTServer.cpp
Server/RelayServer/EZTServer.h
Server/RelayServer/LogWrite.cpp
Server/RelayServer/LogWrite.h
Server/RelayServer/ReadMe.txt
Server/RelayServer/RelayServer.aps
Server/RelayServer/RelayServer.clw
Server/RelayServer/RelayServer.cpp
Server/RelayServer/RelayServer.dsp
Server/RelayServer/RelayServer.dsw
Server/RelayServer/RelayServer.h
Server/RelayServer/RelayServer.ncb
Server/RelayServer/RelayServer.opt
Server/RelayServer/RelayServer.plg
Server/RelayServer/RelayServer.rc
Server/RelayServer/RelayServerDlg.cpp
Server/RelayServer/RelayServerDlg.h
Server/RelayServer/resource.h
Server/RelayServer/SkinBtn.cpp
Server/RelayServer/SkinBtn.h
Server/RelayServer/StdAfx.cpp
Server/RelayServer/StdAfx.h
Server/RelayServer/SysInfoDlg.cpp
Server/RelayServer/SysInfoDlg.h
Server/RelayServer/UserList.cpp
Server/RelayServer/UserList.h
Server/RelayServer/Pdh/Debug/
Server/RelayServer/Pdh/perfmon.cpp
Server/RelayServer/Pdh/perfmon.h
Server/RelayServer/res/Debug/
Server/RelayServer/res/MP_PLAYER_BACK.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_DISABLE.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_DOWN.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_FOCUS.bmp
Server/RelayServer/res/PLAYER_EXIT_BTN_UP.bmp
Server/RelayServer/res/RelayServer.ico
Server/RelayServer/res/RelayServer.rc2
Server/RelayServer/res/start_disable.bmp
Server/RelayServer/res/start_down.bmp
Server/RelayServer/res/start_focus.bmp
Server/RelayServer/res/start_up.bmp
Server/RelayServer/res/stop_disable.bmp
Server/RelayServer/res/stop_down.bmp
Server/RelayServer/res/stop_focus.bmp
Server/RelayServer/res/stop_up.bmp
Server/RelayServer/res/Syncway.ico
Server/RelayServer/res/title_bt_hide_disable.bmp
Server/RelayServer/res/title_bt_hide_dn.bmp
Server/RelayServer/res/title_bt_hide_over.bmp
Server/RelayServer/res/title_bt_hide_up.bmp
Server/RelayServer/res/vod1.ico
Server/RelayServer/res/WIN2000_TITLEBAR_160X120_XBUTTON.bmp
V_CODEC/wmv9VCMsetup.exe
참고 자료
없음이 자료와 함께 구매한 자료
P2P에대한 고찰 (Peer_To_Peer) 16페이지
P2P 파일공유 프로그램 12페이지
당신은p2p에대해얼마나알고있습니까(ppt) 11페이지
ICE(Interactive Connectivity Establishment) 소개 21페이지
유무선 인터넷뱅킹 관련 보안문제와 해결방안 3페이지