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

正文內(nèi)容

computernetworks(編輯修改稿)

2024-08-11 18:12 本頁面
 

【文章內(nèi)容簡介】 tf(“You must type a name.\n”)。 exit(1)。 } printf(“Hello %s”, argv[1])。 return 0。 } 2022/8/12 41 位域 ? 是一種特殊的結構成員,定義域的位數(shù) struct structtypename { type name1:length。 type name1:length。 … }。 2022/8/12 42 Example: Status Byte struct status_type { unsigned delta_cts: 1。 unsigned delta_dsr: 1。 unsigned tr_edge: 1。 unsigned delta_rec: 1。 unsigned cts: 1。 unsigned dsr: 1。 unsigned ring: 1。 unsigned rec_line: 1。 } status。 2022/8/12 43 Example: Status Byte status = get_port_status()。 if () printf(“clear to send”)。 if () printf(“data ready”)。 = 0。 2022/8/12 44 網(wǎng)絡通信的基本模型 ? 建立聯(lián)系 。 ? 交換數(shù)據(jù)(雙向) ? 結束。 2022/8/12 45 Establishing Contact ? 由兩個應用程序之間執(zhí)行 ? 一個應用程序等待連接請求 (called:服務器 ) ? 另一個應用程序發(fā)出連接請求 (called:客戶端 ) 2022/8/12 46 識別一個等待的應用程序(服務器) ? 從概念上說,需要指出 – 哪個計算機 – 該計算機上的哪個應用軟件 ? 術語 – 通過域名識別計算機 – 通過程序名稱識別應用程序 2022/8/12 47 表示和翻譯 ? 人類使用名稱來表示: – puter: – application: ftp ? 而網(wǎng)絡協(xié)議使用二進制值 ? 需要庫程序把名字翻譯成數(shù)字 2022/8/12 48 API舉例 2022/8/12 49 應用程序交互 2022/8/12 50 API中使用的數(shù)據(jù)類型 2022/8/12 51 函數(shù)原型 2022/8/12 52 Example 1: Echo ? 用于網(wǎng)絡測試 ? 服務器返回發(fā)送數(shù)據(jù)的精確備份 ? 在某臺計算機 X上的用戶運行 echoserver 22022 ? 在另一臺計算機上的用戶運行 echoclient X 22022 2022/8/12 53 Example 2: Chat ? 因特網(wǎng)聊天服務的微縮模型 ? 允許兩個用戶之間交流 ? 在計算機 X上的用戶運行 chatserver 25000 ? 在另一臺計算機上的用戶運行 chatclient X 25000 2022/8/12 54 Example 3: Web Server ? 在計算機 X上的用戶運行 webserver 27000 ? 在另一臺計算機上的用戶運行瀏覽器并輸入 URL: 2022/8/12 55 Echoserver ? 運行在因特網(wǎng)上 ? 使用 API請求,而非通常的 I/O ? 不需要了解網(wǎng)絡知識 2022/8/12 56 Echoserver /* */ include include include define BUFFSIZE 256 /* * * Program: echoserver * Purpose: wait for a connection from an echoclient and echo data * Usage: echoserver appnum * * */ int main(int argc, char *argv[]) { 2022/8/12 57 connection conn。 int len。 char buff[BUFFSIZE]。 if (argc != 2) { (void) fprintf(stderr, usage: %s appnum\n, argv[0])。 exit(1)。 } /* wait for a connection from an echo client */ conn = await_contact((appnum) atoi(argv[1]))。 if (conn 0) exit(1)。 /* iterate, echoing all data received until end of file */ while((len = recv(conn, buff, BUFFSIZE, 0)) 0) (void) send(conn, buff, len, 0)。 send_eof(conn)。 return 0。 } 2022/8/12 58 Echoclient /* */ include include include define BUFFSIZE 256 define INPUT_PROMPT Input define RECEIVED_PROMPT Received int readln(char *, int)。 /* * Program: echoclient * Purpose: contact echoserver, send user input and print server response * Usage: echoclient pname [appnum] * Note: Appnum is optional. If not specified the standard echo appnum * (7) is used. * */ 2022/8/12 59 int main(int argc, char *argv[]) { puter p。 appnum app。 connection conn。 char buff[BUFFSIZE]。 int expect, received, len。 if (argc 2 || argc 3) { (void) fprintf(stderr, usage: %s pname [appnum]\n, argv[0])。 exit(1)。 } 2022/8/12 60 /* convert the arguments to binary format p and appnum */ p = ame_to_p(argv[1])。 if (p == 1) exit(1)。 if (argc == 3) app = (appnum) atoi
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1