Network Programming Learning Notes (5)

xiaoxiao2021-03-06  98

Winsock Programming API: (an interface that is unrelated to the agreement)

1. NAGLE Algorithm?

2. The reliability and sequenceability cannot be both, guaranteed the order of the data package, and the integrity of the data cannot be automatically guaranteed. Why is that?

3. Then do we consider the lagming phenomenon in the network communication?

4. If a workstation is issued in the local area network, then each machine takes time to handle this packet to see if there is applying to it. Such a virus in such a machine will slow down a network. As the "shock wave" in the previous period makes the entire local area network. And the route can refuse to transmit the broadcast package.

5. The routing meaning of the protocol: Routing protocol is a challenge to the routing protocol, which is stronger for the packet of the non-routing protocol, where NetBeui is the most unfortunate, she can't routine.

NetBeui: NetBeui is a non-routing protocol developed for IBM for carrying NetBIOS communication. NetBeui lacks routing and network layer addressing functions, both its biggest advantages, but also its largest shortcomings. Because it does not require additional network addresses and network layers, so soon and effectively and applies to small workgroup environments that only have a single network or throughout the environment.

6. WSAENUMPROTOCALS: The acquisition of the installation information of the network protocol.

WSASTARTUP: Open a new Winsoke

INT WSASTARTUP (Word Wversion Requested, LPWSADATA LPWSADATA)

The WSADATA structure is:

Struct wsadata {

Word wversion;

Word WHighversion;

Char szdescription [WSADESCRIPTION_LEN 1];

Char SzsystemStatus [WSASYSSTATUS_LEN 1];

UNSIGNED Short ImaxSockets;

UNSIGNED Short Imaxudpdg;

Char far * lpvendorinfo;

}

7. WSaclentup: When you don't have a Winsoke, you will work.

8. Socket: The handle pointing to the transmission provider (the interpretation of the handle is described in detail in the last diary).

Create a socket: socket socket (int Af, int type, int protocol); 9. The first three parameters of the socket are organized into three levels. The first is also the most important parameter is the address family. It specifies which protocol ready to use, and specify a valid option for the second and third parameters. For example, if the AT M address family (A F _ AT M) is selected, then when the socket type is selected, it will only be used to use the original socket (S O C K _ R AW). Where WSASocke can provide a more comprehensive parameter linked list.

转载请注明原文地址:https://www.9cbs.com/read-123446.html

New Post(0)