freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

基于c局域網視頻聊天設計(更新版)

2024-10-22 18:25上一頁面

下一頁面
  

【正文】 elated Methods private ponents = null。 public byte [] byBuff。 ( , 0, , , receiveData, s )。 // (Re)Setup a callback to be notified of connection requests (new AsyncCallback( OnConnectRequest ) , listener )。 if (bSend) (b, iLength, )。 ( new IPEndPoint( ip, nPortListen ) )。 public event TcpConnected Disconnected。 ()。 ()。 } public TcpServer(int nPortListen) { _TcpServer(nPortListen, GetAddresses()[0])。 endregion // Return an array of the ip addresses assigned to this pc public static IPAddress [] GetAddresses() { IPAddress [] aryLocalAddr = null。 服務器端連接,是指當服務器端 socket接收到客戶端 socket的連接 請求后,就把服務器端 socket 的描述發(fā)給客戶端,一旦客戶端確認了此描述,連接就建立了。 面向連接的 c/s時序圖如圖 41所示 服務器 客戶端 客戶端 . . . 5 圖 41 程序時序圖 系統(tǒng)由服務器終端采集傳輸系統(tǒng)和客戶端接收系統(tǒng)兩部分組,系統(tǒng)構架如圖 42所示 圖 42 系統(tǒng)架構 程序設計分析 Accept() Recv() Send() Close() Listen() Bind() Socket() 服務器 發(fā)送數(shù)據(jù) 確認發(fā)送數(shù)據(jù) 請求建立連接 Recv() Close() Send() Connect() Socket() 客戶 攝像頭 采集卡 服務器服務程序 網絡傳輸模塊 網絡接收模塊 客戶端程序 解碼 顯示 視頻流 控制指令 視頻流 控制指令 6 任務目標 服務器端程序目標:服務器服務器端服務程序進行數(shù)據(jù)采集(捕捉攝像頭捕獲數(shù)據(jù)),提供IP端口實現(xiàn)數(shù)據(jù)流的傳輸。 TCP將包排序并進行錯誤檢查,同時實現(xiàn)虛電路間的連接。用戶為了傳輸一個文件請求一個和其它計算機的連接,連接 建立后,就開始傳輸文件。這些協(xié)議是在系統(tǒng)表層以下工作的。監(jiān)控服務器通過 Inter/Intra 輪詢網絡攝像機獲取視頻。對于自動啟動的 Windows服務程序,它們在 Windows啟動或是重啟之后用戶登錄之前就開始執(zhí)行了。 本系統(tǒng)采用 DirectShow 網 絡組播技術實現(xiàn)了視頻捕獲、視頻壓縮、網絡傳輸、視頻解碼和實時回放,減小了網絡帶寬占用,高效的傳輸視頻數(shù)據(jù),獨立于硬件。因為 Windows服務程序一般是沒有用戶界面的,所以你也要通過命令行工具或是下面圖中的工具來停止它,或是在系統(tǒng)關閉時使得 Windows服務程序自動停止。 DirectShow 為多媒體流的捕捉和回放以及二次開發(fā)提供了強有力的支持。在機器 IP 地址和其它信息的基礎上, IP 確保信息包能正確地到達目的機器。 IP數(shù)據(jù)包是不可靠的,因為 IP并沒有做任何事情來確認數(shù)據(jù)包是按順序發(fā)送的或者沒有被破壞。應用程序輪流將信息送回 TCP 層, TCP 層便將它們向下傳送到 IP層,設備驅動程序和物理介質,最后到接收方。 客戶端連接是指由客戶端的 socket 提出連接請求,要連接的目標是服務器端的 socket。s the number // that can queue up waiting for you to Accept them. If more than MAXCONNECTION // more clients try to connect while you are servicing another, OnConnect is // probably taking too long. 7 const int MAXCONNECTIONS = 3。 if USING_NET11 IPHostEntry ipEntry = ( strHostName )。t close the listener // while there is an outstanding async call active. And you can39。 t = new TcpClient((), )。s no way to clean up // nicely. Moral: Always call Dispose. //Dispose()。 private void _TcpServer(int nPortListen, IPAddress ip) { try 10 { // Initialize member vars m_aryClients = new ArrayList(5)。 } catch { m_bShuttingDown = true。 lock (this) { if (!m_bShuttingDown) { // Wrap the client and add it to the array SockWrapper s = new SockWrapper(client)。T setup // the async listen, and DO set the event // to say we are done. ()。 } 13 } } } // Remove a connection from the list of active connections private void RemoveConnection(SockWrapper s) { try { ( )。 byBuff = new byte[256]。 = WebCamService。 } } region Member Variables private const int MAXOUTSTANDINGPACKETS = 3。 } /// summary /// Stop this service. /// 停止服務 /// The Run() Method tests for this thread state each second /// 每秒都為這個進程啟動方法測試 /// /summary protected override void OnStop() { 16 // Set exit condition //設置退出狀態(tài) bShutDown = true。 Capture cam = null。 serv = new TcpServer(TCPLISTENPORT, ()[3])。 myEncoderParameter = new EncoderParameter(, JPEGQUALITY)。 } ()。 ( 0)) { try { // capture image //圖像俘獲 ip = ()。 19 // Empty the stream //清空流 (0)。 (Dropped frames: + ())。 if (b) { m_PacketCount++。 iConnectionCount++。 } // Find the appropriate encoder // 查找合適的編碼器 private ImageCodecInfo GetEncoderInfo(String mimeType) { int j。 private pictureBox1。 private timer1。 } region Windows Form Designer generated code /// summary /// Required method for Designer support do not modify /// the contents of this method with the code editor. /// /summary private void InitializeComponent() { = new ()。 = new ()。 = pictureBox1。 = new (96, 35)。 = new (115, 21)。 = 4。 // // txtPort
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1