I have been learning java web before, such as front-end framework, SSM, nginx and database. My understanding of network programming can be said to be almost zero. Recently, in my work, I need to use netty to realize some functions of Intranet communication, which is more embarrassing. I instantly feel that the world is full of malice. Isn't thi ...
Posted by intercampus on Tue, 24 May 2022 01:42:01 +0300
In the previous demonstration example of blog network programming (3), the simplest code flow of TCP has been introduced. This chapter expands on this basis:
First, the server can continuously receive messages from the client, and the client can also send messages to the server repeatedly;
After that, continue to improve the server, simply use ...
Question: how to expand the previous communication framework to support UDP communication and become a perfect network communication framework?UDP communication extensionOutline design of UDP communication entityEach UDP Point is peer-to-peer (because it is not necessary to initiate a connection actively), and can communicate through ip address ...
Posted by optik on Thu, 12 May 2022 13:51:43 +0300
1, Can a port number be bound by two processes at the same time?
According to the binding of port number, we will discuss the following situations:
The two processes establish TCP server s respectively and use the same port number 8888
Two processes establish UDP server s respectively and use the same port number 8888
Two processes, one esta ...
Posted by Collin on Sun, 08 May 2022 07:17:03 +0300
Java Essay - BIO, Socket instance, realize the transmission of multiple data
Realize the transmission of multiple data
In a previous blog ( Java Notes - BIO Socket Programming Example ), two simple Socket programming examples are given. One is to implement byte stream transmission. Since the server does not know when the data transmi ...
Posted by Zephyris on Sat, 07 May 2022 14:07:06 +0300
Both write() and send() can send and receive data. What's the difference?send can use flags to specify optional information, where 0 indicates the default sending behaviorsend when the flags are 0, it will wait for the data in the transmission buffer to be cleared before putting the data into the transmission buffer and then returningwrite cann ...
Posted by php_blob on Sat, 07 May 2022 05:21:29 +0300
Socket intermediate application on Linux platform - TCP file transfer
1, Purpose and task of the experiment
Review the IP configuration knowledge of ubuntu.
This experiment requires to master the TCP communication process.
Understand the basic method of TCP programming, the phenomenon of packet splicing and the realization of file transmissi ...
Posted by mightyworld.com on Sat, 07 May 2022 03:29:58 +0300
Reprinted from: https://www.cnblogs.com/wade-luffy/p/6164668.html
The original text is as follows:
First of all, we need to clarify a concept: what is the abbreviation of NIO? Some people call it New I/O, because it is new to the previous I/O class library, so it is called New I/O, which is its official name. However, since the old I/O class li ...
Posted by Sware on Fri, 06 May 2022 02:49:30 +0300
socket interface has been widely used in modern operating systemsThe socket programming interface under Windows is almost the same as that in LinuxDifferencesDifferent return types (handle types)The handle is not a file descriptor, and not all files are connected in Window (therefore, send and recv cannot be used for socket s in windows)Usage o ...
Posted by iphone2008 on Thu, 28 Apr 2022 05:12:18 +0300
Question: how to program the network?The essence of network programmingUsing the interface function provided by the operating system, the application program has the ability to send and receive network dataThe network interface is a function provided by the operating system at the code levelNetwork programming is just a fancy way to play a seri ...
Posted by gilmourt on Sun, 24 Apr 2022 13:04:21 +0300