Network programming 06-server programming non-blocking IO, multiplexing

Table of contents 1. Four high-performance IO models in server programming 1. Block IO 2. Non-blocking IO 3. Multiplexing 4. Signal drive 2. Blocking IO 3. Non-blocking IO 1. The difference between blocking IO and non-blocking IO 2. How to set the non-blocking attribute to the file descriptor----fcntl() ----- man 2 fcntl 4. Multiple ...

Posted by vornn on Wed, 09 Nov 2022 03:11:14 +0300

Terminal chat rookie version of Java network programming

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

Network Programming TCP socket programming concurrent server

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 ...

Posted by Lauj on Sun, 22 May 2022 15:43:46 +0300

Linux network development tutorial 18_ Improvement of network communication framework

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

Can a port number be bound by two processes at the same time?

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

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

Linux network development tutorial 13_ Extended usage of data transceiver

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

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

Basic concepts and principles of JDK NIO

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

Linux network development tutorial 6_ Network programming under window

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