全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:3616
推到 Plurk!
推到 Facebook!

[轉貼] Winsock 系統及應用程式解惑篇 (二)

 
axsoft
版主


發表:681
回覆:1056
積分:969
註冊:2002-03-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-07-05 17:57:42 IP:61.218.xxx.xxx 未訂閱
Winsock 系統及應用程式解惑篇 (二)     -- 林軍鼐 --    [問題 1] 我想請問我是用 ewan 1.05版, 我在輸入中文時常會有亂碼出現,          必須按 Ctrl-L 或用 Mouse 點一下才可清楚的看到中文顯示,          為什麼呢?    [回答] 關於這個問題, 筆者向人請教的可能性如下: 一般來說, 我們所        使用的主機大多都是英文系統, 能顯示中文是硬加上去的. 中文        碼是兩個 bytes, 而英文是一個 byte; 當中英文夾雜, 或是你在        editor 內按了移動游標位置的鍵時, Telnet 程式會依你按的鍵        去移動, 比如你按了退後一格的鍵, 到底是該退一個中文字或是        一個 byte 呢; 照理說, 我們可能希望它退一個中文字, 但是實        際上 Telnet 程式應該是沒有判斷現在游標是在中文字的左邊        byte 或是右邊 byte 的能力, 它只是很誠實地往移左一個 byte;        然後重新顯示游標右邊的字串, 因此可能整個中文顯示錯誤,        出現亂碼. 當你按 Ctrl-L 時, 整個螢幕會重新顯示一次, 所以        中文顯示就正確了. WinSpan 的 Telnet 在移動游標時, 會整行        重新顯示, 所以較少會出現中文亂碼的現象; Ewan 由於是外國人        設計的, 他並沒有考慮中文顯示的問題, 因此用在中文系統上就        極易出現亂碼了.    [問題 2] Netscape 的 NetNews 要如何使用?    [回答] 設定 NetScape 的 News Server 的方法為: 選擇 Options 下的        Preference, 然後在最上面的 List Box 中選擇  "Directories,        Applications and News", 然後在 News Server 欄位填入您要連        的 News 主機名稱. 使用時, 選擇 Directory 選項下的 "Go to        Newsgroups", 即可連上 News Server 了.    [問題 3] NetScape如何執行 telnet ? 該怎麼改設定呀? 每次有 telnet          xxxxxx 的東西按下去都出現錯誤耶, 教教我吧.    [回答] 由於 NetSacpe 沒有內建的 telnet 功能, 所以你必須選 Options        選項下的 Preference, 然後在最上面的 List Box 中選擇        Directories, Applications and News, 然後在 Telnet Application        欄位設定一個可以被 NetScape 帶起的 Telnet 程式 (如 trmptel.exe).    [問題 4] Notebook 能玩 Winsock 嗎?    [回答] 理論上 Notebook 與一般的 PC 應該是一樣的, 所以使用 Notebook 來        執行 Winsock 環境應沒有問題. SEEDNET 服務中心的人員就曾將        WinKing 裝在 Notebook 上, 並執行了各式的 Winsock 應用程式.    [問題 5] 資策會的 WinKing 與 WinSpan 有何不同?    [回答] WinKing 與 WinSpan 均是依照 1993 年 1 月公佈的 Winsock        (Windows Sockets) 1.1 規格所設計, 都是提供 MS Windows        下的標準 TCP/IP 網路發展及使用環境.        WinKing 為資訊技術處於 83 年度為經濟部科技專案所研發之一        Winsock Stack (Protocol Stack + Winsock.dll), 主要目的是        為提供國內廠商有此技術, 所以有興趣的廠商或是打算在 Winsock        環境上開發 TCP/IP 網路軟體的公司, 可向 SEEDNET 服務中心申請        技術轉移(含原始程式碼及技術文件). 另外 SEEDNET 服務中心為了        讓一般用戶也可以在 Windows 環境下使用 SEEDNET/Internet,        亦提供 WinKing 之試賣版, 有意者可洽該服務中心購買. (試用版        可用 anonymous ftp 方式自 tpts1.seed.net.tw 的 UPLOAD/        WINKING 目錄取得) WinKing 提供 Ethernet 及 PPP 電話連線之        功能; 唯 WinKing 並無自己的應用程式, 使用者須從 SEEDNET        台北主機 tpts1.seed.net.tw 或其他主機(如 iiiafs.iii.org.tw)        上取得 public domain 的 Winsock 應用程式來自行搭配使用.        WinSpan 則為資策會產品開發處開發之商業套裝軟體, 主要是搭配        該處所開發之 Winsock 應用程式使用. WinSpan 因是一商業產品,        所以僅提供執行檔, 並不提供原始程式碼. 有興趣者, 可逕向資策會        產品開發處或其代理商洽購. WinSpan Lite 僅提供 PPP 連線使用,        無法用於 Ethernet 網路; WinSpan 則提供 Ethernet/PPP/SLIP        的功能.    [問題 6] 我執行 WinSpan 的 Mail 程式時, 為何會出現下列訊息?          " Please setup the mail service TCP PORT "    [回答] 筆者猜想您是使用 Trumpet Winsock 或其他的 Winsock Stack,        而不是用 WinSpan 本身的 Winsock Stack (Console). WinSpan 的        Mail 程式內是呼叫 getservbyname() 函式來取得"郵局協定"(POP,        Post Office Protocol)所用的 port number; 一般言, 目前所用的        pop 協定為第 3 版, 我們稱 pop3. WinSpan 的 Mail 程式傳入的        卻是 "pop", 而不是 "pop3", 所以其他的 Winsock Stack 的 services        檔中並沒有 pop 這項服務的資料, 您只要在您 Winsock 環境的        services 檔加上一行, "pop  110/tcp", 應該就不會再出現這個問題了.    [問題 7] 我使用 WinSpan 來送 Email, 但是對方收到 Email 後, 直接做 reply          卻被退回, 因為我的發信位址錯誤. 我的 Email 位址原為 vincent@          tpts1.seed.net.tw, 但是對方收到時, 發信人的位址卻是 vincent@          tpts1.tpts1.seed.net.tw. 重覆了一個 tpts1, 為什麼會這樣呢?    [回答] 您在使用 WinSpan 的 Configure 程式設定 Mailer 的 POP Server        時, 一定是只填了 tpts1, 而不是 tpts1.seed.net.tw 完整的名稱.        而您的領域名稱 (domain name) 是設為 tpts1.seed.net.tw.        WinSpan 的 Mail 程式, 取得您設定的 Mail Server 名稱時, 如果        當中沒有 "." 號的話, 它會主動加上您設定的領域名稱; 所以您        的 Mail Server 名稱就成了 tpts1.tpts1.seed.net.tw.        您只要將 POP Server 設定為完整的名稱, 而不要用簡稱, 就不會        再發生上述的問題了.    [問題 8] 我每次用 qvtw3988 開 telnet session 時, 它都會將我的 NumLock          打開, 而且一開我就關不回來了. 我是用筆記型電腦, 這造成我一些          麻煩. 請問如何設定可以使得在開 telnet session 時不造成 NumLock          呢?    [回答] 請將 qvtnet.ini 中的 nl_mode 設為 unlock.    [問題 9] MOSAIC 2.0a2 與 2.0a7 有何不同? 2.0a7 與 2.0a8 又有何不同?    [回答] 筆者自網路上獲得的解答如下:        wmos20a2 是 16bits 程式, wmos20a7 與 wmos20a8 是 32bits 程式.        wmos20a7 必須使用 WIN32S 1.15A; wmos20a8 必須使用 WIN32S 2.0        支援 OLE.    [問題 10] WinSock 程式問題: WSAAsyncSelect() 函式中的引數 FD_WRITE           一般在甚麼情況下使用呢? 送資料時, 不是呼叫 send() 就可以了嗎 ?           要如何用 WSAAsyncSelect() ... 非同步 send() ?    [回答] FD_WRITE 事件發生的情況:           由字面上看,FD_WRITE 應該是要求系統通知我們某個 Socket 現在是否        可以呼叫 send() 或 sendto() 來傳送資料?答案可以說「是」,但是        它和 FD_READ 卻又有不同的地方。           我們呼叫一次 recv() 後,如果 input buffer 中尚有資料未被取出的話,        系統會再通知我們一次 FD_READ。那麼如果我們呼叫一次 send() 後,系統        的 output buffer 仍有空間可寫入的話,它是否會再通知我們一個        FD_WRITE, 叫我們繼續傳送資料呢?這個答案就是「否定」的了!系統並不        會再通知我們了。           系統會通知我們 FD_WRITE 事件的訊息,只有下列幾種情況:          (1)呼叫 WSAAsyncSelect() 來設定 FD_WRITE 事件時,Socket 已經可以            傳送資料(TCP scoket 已經和對方連接成功了,或 UDP socket 已建立            完成),且目前 output buffer 仍有空間可寫入資料。       (2)呼叫 WSAAsyncSelect() 來設定 FD_WRITE 事件時,Socket 尚不能傳送            資料,不過一旦 Socket 與對方連接成功,馬上就會收到 FD_WRITE 的            通知。       (3)呼叫 send() 或 sendto() 傳送資料時,系統告知錯誤,且錯誤碼為            10035 WSAEWOULDBLOCK.(呼叫 WSAGetLastError() 可得知這項錯誤),            這時表示 output buffer 已經滿了,無法再寫入任何資料(此時即令呼叫            再多次的 send() 也都一定失敗);一旦系統將部份資料成功送抵對方,            空出 output buffer 後,便會送一個 FD_WRITE 給使用者,告知可繼續            傳送資料了。換句話說,讀者在呼叫 send() 傳送資料時,只要不是返回            錯誤 10035 的話,便可一直繼續呼叫 send() 來傳送資料;一旦 send()            回返錯誤 10035,那麼便不要再呼叫 send() 傳送資料,而需等收到            FD_WRITE 後,再繼續傳送資料。    [問題 11] 最近多媒體郵件似乎開始熱門起來, 有沒有人可以說明一下 MIME 的格式?    [回答] 資策會資技處黃建文先生寫了一些有關 MIME 的文章, 置於 SEEDNET 台北        主機 tpts1.seed.net.tw 的 UPLOAD/jenwen 目錄下, 檔名為 mime*.exe.        各位有興趣的讀者, 可用 anonymous ftp 方式, 取去參考. 黃建文先生        與蘇世欽先生, 也為國人開發了一套相當不錯的多媒體郵遞服務系統, 稱為        "Acacia". 有興趣者, 可向 SEEDNET 服務中心詢問. (試用版可自 iiiafs.        iii.org.tw 的 SEEDNET/acacia 目錄, 或是 UPLOAD/jenwen 目錄取得)    [問題 12] 我在執行某些程式時, 會出現 10035 WSAEWOULDBLOCK 或是 10038           WSAENOTSOCK 的訊息; 它們代表什麼意思呢?    [回答] 會出現 10035 WSAEWOULDBLOCK, 代表這個應用程式將 socket 經由        ioctlsocket() 或 WSAAsyncSelect() 函式, 設定為 non-blocking 狀態;        而在程式中呼叫到 accept(), connect(), recv(), send() 等 blocking        函式, 可是目前事件未完成或條件不成立, 原本程式應該會 block 在這個        呼叫, 但由於先前已將 socket 設為 non-blocking 了, 所以我們並不會被        block 住, 函式呼叫會馬上 return, 這時系統給我們的錯誤就是 10035        WSAEWOULDBLOCK.        至於 10038 WSAENOTSOCK 則表示該程式在呼叫 Winsock API 時, 傳入的        參數中的 socket 號碼, 並不屬於該程式. 各位必須注意, 在 Winsock 1.1        中一個 socket 只屬於建立它的那一個 task, 別的 task 並不能來分享使用        這個 socket. 也就是說, 程式 A 建立的 socket, 程式 B 並不能使用它.        不過這個觀念在 Winsock 2.0 中可能會有所改變, 據筆者的了解, Winsock        2.0 中將定義 group socket 的觀念, 也就是說某個 task 建立的 socket,        可以被同一個 group 的其他 tasks 來分享使用.    [問題 13] Netlite 是什麼東西? Amadeus 又是什麼東西?    [回答] Netlite (Internet Works) 和 Mosaic, NetScape 一樣是 WWW Browser,        可用來連接 WWW Server, Gopher Server 等等. 想要試試的人, 可以取自        tpts1.seed.net.tw (139.175.1.10) 的 UPLOAD/WINKING/Winsock_AP 目錄        下的 netlite.exe 檔案.        Amadeus 是一個 Hyper-G 系統的 Client 程式. Hyper-G 一種類似 WWW 的        超媒體資訊系統(Hypermedia Information System); 和其他網路比較不一樣        的地方, 應該是 Hyper-G 的 links 是雙向的, 且 Servers 在它們本身的體系        中知道所有的連結(links), 而當一個物體(object) 從這個體系中消失時,        Server 可以找到並將所有連結到該物體的連結全部都刪除. 有興趣試試這個和        WWW 不一樣的超媒體系統的讀者, 可在與 NetScape 相同的目錄下, 將        amadeus1.zip, amadeus2.zip 及 amadeus3.zip 取回去安裝使用試試看.           以下是交大吳毅成老師提供給我有關 Hyper-G 的資料.           Hyper-G [10] is an ambitious distributed hyper-        media research project at a number of institutes        of the IIG (Institutes for Information-Processing        Graz), the Computing and Information Services        Centre of the Graz University of Technology, and        the Austrian Computer Society. It is funded by        the Austrian Ministry of Science. It combines        concepts of hypermedia, information retrieval        systems and documentation systems with aspects        of communication and collaboration, and computer-        supported teaching and learning.           Unlike WWW, Hyper-G supports bi-directional        links.  This enables users to see which other        documents reference the one they are using,        and also allows the system to avoid dangling        pointers when a linkedto document is deleted.        Another difference from WWW is that links are        kept separately from their source and target        nodes, to allow easy linking of read-only documents        and for ease of link maintenance.  In addition to        manually defined links, Hyper-G supports automatic        static and dynamic (i.e., view-time) generation        and maintenance of links.           Hyper-G has a concept of generic "structures" -        an additional layer of relationships imposed on        (and orthogonal to) the web of documents and links.        A document can be part of more than one structure,        and structures may be hierarchically related. Types        of structure include:           * "Clusters" are a set of documents which are all          presentedtogether.           * "Collections" are unordered sets of documents or          other structures, and can be used as query domains          or to construct gopher-like menus.           * "Paths" are ordered sets of documents or structures,          which must be visited sequentially.           One application of the structure concept is the        provision of "guided tours" through the information        space.           In addition to hypernavigation, the collection hierarchy        and guided tours, another strategy for interaction with        the system is the use of database queries.  Two kinds of        query are supported: keyword searching in a user-defined        list of databases; and collection specific form-filling        queries.  In the latter case, the answer to the query may        appear dynamically as the form is filled out.           Four modes of user identification are supported:        "identified", where a userid is publicly associated        through name and address information with a particular        individual; "semi-identified", where a userid is associated        by the system with an individual, but the user is only        known to other users through a pseudonym; "anonymously        identified", where the userid is not associated by the        system with any individual; and "anonymous", where there        is no userid (or a generic userid such as "guest").        Possible operations in the system depend on the user's        mode of identification.  Users may access the system in        any desired mode, and switch to other modes only when        necessary.           Hyper-G contains specific support for multilingual        documents and document clusters.  Users may specify an        ordered list of preferred languages, for instance.        There are plans to experiment with automatic translation        programs.           Integration of other, external, systems such as WWW into        Hyper-G in a seamless manner is possible.           Hyper-G is in use as a CWIS within Graz Technical University.        Client software is available for UNIX workstations from DEC,        HP, SGI, and SUN.  The system is still in an experimental        state, but it has been used by about 200 students as part        of a course on the social impact of information technology. --February/08/199511:14:55--        時間就是金錢
系統時間:2024-07-02 15:26:28
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!