Deep analysis of source code for building native network model with go netpol I / O multiplexing

introduction Go builds a simple and high-performance native network model (I/O multiplexing netpoll based on go) based on I/O multiplexing and goroutine, which provides a simple network programming mode such as goroutine per connection. In this mode, developers use the synchronous mode to write asynchronous logic, which greatly reduces the ment ...

Posted by robertvideo on Sat, 09 Nov 2019 07:14:14 -0800

Network communication socket: network communication addressing, protocol cluster and socket type finding service information

11.2.1.2 find service information In addition to the IP address, each socket address includes an integer port number. Many applications can run on the same host and listen to an IP address, but only one socket can use the port of that address at a time. By combining IP address, protocol and port number, a communication ...

Posted by mayanktalwar1988 on Fri, 08 Nov 2019 13:18:31 -0800

TCP upload case (basic) client file upload to server

Requirement Description: make a "file upload case" Requirement: upload a picture in the project to the server through the client Operation steps: 1. Create the server and wait for the client to connect 2. Create a client Socket and connect to the server 3. Get the output stream in the Socket stream. Function: ...

Posted by jackmn1 on Fri, 08 Nov 2019 12:28:48 -0800

Technology sharing | login MySQL safely without password

By Daniel gusman BurgosGuan ChanglongOriginal text: https://www.percona.com/blog/... Some people say the best password is one you don't have to remember. The auth? Socket plug-in and MariaDB's UNIX? Socket make this idea possible on MySQL. auth_socket: https://dev.mysql.com/doc/ref... unix_socket: https://mariadb.com/kb/en/lib... Although t ...

Posted by Baumusu on Fri, 08 Nov 2019 02:27:29 -0800

How to develop a WebSocket online chat communication system?Swoole and TP are good

ThinkPHP using Swoole requires the think-swoole Composer package to be installed, provided the Swoole PECL extension is installed on the system Install think-swoole by executing the composer command in the project root directory of tp5: composer require topthink/think-swoole Say nothing but code directly: Create a new WebSocket.php controller: ...

Posted by mark_h_uk on Thu, 07 Nov 2019 10:37:32 -0800

js+node.js+socket.io realizes chat function (private chat, group chat creation)

Design sketch: Four clients are started for testing 1. Log in and get the list of online users2. Private chat function3. Group chat function I found WebSocket by chance. I found that it can communicate in real time and chat online. So I made a demo of chat tool and recorded it Source code Socket.io WebSocket is native to js, and Socket.io is a ...

Posted by slamMan on Thu, 07 Nov 2019 00:24:35 -0800

pip installation module uses domestic image source to accelerate installation

Today, when installing the Python module matplotlib, the installation is not successful. The prompt "socket.timeout: The read operation timed out" or "Read timed out" is always displayed Because of the high latency of domestic network access to foreign countries, the installation of the module is very slow, and it must not b ...

Posted by keveen on Wed, 06 Nov 2019 15:10:13 -0800

Network part -- socket realizes C-S data interaction

1. Input man socket into the terminal to check the contents of socket 2. Create socket on the server side /* First parameter domain (network type): pf? INET IPv4 / PF? Inet6 IPv6 The second parameter type (socket type): sock'stream connection oriented -- TCP protocol / sock'dgram connectionless -- UDP protocol The th ...

Posted by jmelnick on Wed, 06 Nov 2019 14:34:21 -0800

An example of UDP communication in linux

After the UDP client establishes the socket, it will directly send data with sendto function, and there is also an operation implied, That is, before sending data, UDP will first select a separate UDP port for the socket (at 1024 -5000), set the socket to the bound state. If a UDP client establishes a socket First, the ...

Posted by kapishi on Tue, 05 Nov 2019 11:04:43 -0800

Install mysql on centos

This article still uses xftp to upload gz files, and then operates on xShell. If you do not install these two files, please refer to the previous blog. 1. Upload the downloaded file to the corresponding location with xftp.   2. Unzip the file: tar-zvxf-mysql-5.7.28-linux-glibc2.12-x86_.tar.gz 3. Create mysql folder under / usr/local folder m ...

Posted by chelsea7 on Mon, 04 Nov 2019 23:46:11 -0800