TCP/IP, UDP, HTTP, socket inside and out
The network is divided from bottom to top: corresponding
Physical Layer
Data Link Layer
Network layer (IP protocol)
Transport layer (TCP protocol)
Session Layer
Application layer and Presentation layer (HTTP protocol)
The socket is the encapsulation and application of the TCP/IP protocol (at the programmer level). It can also be said that the TPC/IP protocol is the Transport Layer protocol, mainly to solve ho
This is a creation in
Article, where the information may have evolved or changed.
1. Guidance
Remember to go to college in the "Computer Network Foundation" specialized class, at that time is really pure kind ignorance, think I later do not engage in network this piece of things, do not need to study computer network This course, as long as the exam pass on the line. But after work I found that whether we do software development, will be more or less contact with the computer network, because th
UDP can be used in many aspects. So what we will introduce to you today is the process of implementing UDP using the WinSock API. First, let's take a look at the basic definition. User Data Protocol (UDP) is a Protocol used to define computer communication for Packet Exchange in an interconnected network environment. It is one of the widely used communication pro
Transport layer: UDP Protocol I, Transport Layer protocolFrom the network layer protocol described earlier, the two ends of the communication are both hosts, the IP datagram header indicates the IP address of the two hosts. But from the transport layer, it is a process in the sender host that is exchanging data with a process in the receiving host, so strictly speaking, the communication parties are not the hosts, but the processes in the host. The
The Transport layer provides communication services to the application layer above it, which belongs to the highest level of the communication section and is also the bottom of the user's function.
Two hosts are actually communicating with each other in a two host application process . Communication between application processes is also known as end-to-end communication .
The messages of different processes in the application layer are delivered down to the transport layer through different
When it comes to UDP programming, the easiest thing to think about is how many bytes are sent at a time? Of course, this does not have the only answer, compared to different systems, different requirements, the answer is not the same, here just like the ICQ type of sending chat messages to analyze, for other cases, may also get a little help: First of all, we know that tcp/ IP is generally considered to be a four-layer protocol system, including lin
WIZnet has previously described the W5500evb in TCP mode of two (server and client) data transmission implementation process, then the Transmission Control Protocol, UDP is also very common, this non-connected protocol in more places to provide users with convenience, such as e-mail , QQ chat and receive messages ... Well, then learn today, the UDP mode on the W5500evb simple implementation. An experimental
When we explain the TCP protocol, we should note that the TCP protocol is a protocol set. One of the Protocols is UDP. This is the user data packet protocol we will introduce to you today. So what is it for? What is its structure? Here we will go one by one.
UDP protocol
User Data Protocol (UDP) is also a communication Protocol on the OSI transport layer. However
Java TCP/UDP socket programming process summary, udpsocket
Recently I learned a little bit about java socket programming. Although the overall process is not very complicated, it is worth summing up.Socket
A Socket is an abstraction for the network. An application can read and write data on the network. Just like using a file handler to write data to a storage device. Depending on the TCP protocol and UDP p
M_ssourport; Source Port number 16bitShort M_sdestport; Destination port number 16bitunsigned int m_uisequnum; Serial number 32bitunsigned int m_uiacknowledgenum; Confirmation Number 32bitShort M_sheaderlenandflag; Top 4 bits: TCP header length, medium 6 bit: reserved, last 6 bits: Flag bitShort m_swindowsize; Window Size 16bitShort m_schecksum; Inspection and 16bitShort M_surgentpointer; Emergency data offset 16bit}__ATTRIBUTE__ ((Packed)) Tcp_header, *ptcp_header;typedef struct _TCP_OPTIONS{C
sending it out. (Basic NAT will change the original IP address in the IP packet, but will not change the port in the IP packet)For basic Nat information, see RFC 1631.
The other Nat is called napt. We can also see from the name that napt will not only change the IP address of the IP datagram through the NAT device, but also change the TCP/UDP port of the IP datagram. We may not see much about basic NAT devices (Haha, I have never seen it). napt is th
TCP-the transmission control protocol provides connection-oriented and reliable byte stream services. Before the customer and the server exchange data with each other, a TCP connection must be established between the two parties before data can be transmitted. TCP provides timeout resend, discard duplicate data, test data, traffic control, and other functions to ensure data can be transferred from one end to the other.
UDP-the User Datagram Protocol i
. Therefore, the SYN 1 indicates that this is a connection request or a connection acceptance message.
terminate FIN: Used to release a connection. When FIN = 1 o'clock, it indicates that the sender's data for this segment has been sent and that the transport connection is released.
8) window (16-bit)
This field is used for flow control, which is the number of bytes that the native expects to receive at one time, that is, the size of the window that sends the data. Tell the other
What is a UDP protocol
The full name of the UDP protocol is the user datagram, which is used in the network as a TCP protocol for processing packets. In the OSI model, at layer fourth, the transport layer, is at the upper level of the IP protocol. UDP has the disadvantage of not providing datagram grouping, assembling and sorting packets, that is, when a message
In the UDP programming, we are most likely to think of the problem is how many bytes to send a good?
Of course, this does not have the only answer, compared to different systems, different requirements, the answer is not the same, I am here only for
Like the ICQ type of sending chat messages to analyze the situation, for other situations, you may also be able to get a little help:
First of all, we know that TCP/IP is usually considered to be a four-la
Keywords: P2P UDP Nat principle penetration traveral hierarchical Ric coneAuthor: hwycheng LEO (FlashBT@Hotmail.com)
Download source code:Http://www.ppcn.net/upload/2005_08/05080112299104.rarRefer:Http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt
Principles and implementation of P2P UDP-based NAT penetration (shootingstars)
Description:
There are few Chinese documents about
This time, we will summarize the UDP and IGMP in the IP layer. UDP is a simple datagram-oriented transport layer protocol that provides unreliable services: It adds the application data to the UDP header and then sends it to the IP layer, but they cannot be guaranteed to reach their destination. The application must be concerned with the length of the IP datagram
parties.Difference Between TCP and UDP: 1. based on connection and no connection 2. requirements on system resources (more TCP and less UDP) 3. stream mode and datagram Mode 4. TCP ensures data correctness, UDP may cause packet loss, and TCP ensures data orderConnection-free: Connection and less onless are common terms in network transmission. Their relationship
In the application process of UDP protocol, we found the advantages of UDP socket to facilitate access to servers and clients. So what is UDP socket? Now let's give a brief introduction.
UDP socket
UDP provides an end-to-end service different from the TCP protocol. In fact,
1. The role of the UDP protocolThe IP protocol cannot differentiate multiple applications on the same host system. UDP uses ports to identify different applications on the same host.The process ID cannot be taken to identify the cause of the different applications:1) The process ID assignment and destruction of the application in the system is dynamic and the sender cannot determine what the application's p
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.