Java small project: teach you to make a chat system!

Java project: chat systemToday's java hands-on project is a simple chat room with simple interface and easy operation.It is divided into three parts: registration system, login system and chat system. It is very suitable for java Xiaobai to practice.Complete source code and material please pay attention to and private letter I get! Interface d ...

Posted by skeezmo on Mon, 03 Feb 2020 08:32:40 -0800

Get through the network source code series seven worker group registration NioSocketChannel

Get through the network source code series seven worker group registration NioSocketChannel worker group registration NioSocketChannel Read message doReadBytes writeBytes setBytes internalNioBuffer _internalNioBuffer allocHandle.lastBytesRead(doReadBytes(byteBuf)) pipeline.fireChannelRead(byte ...

Posted by daredevil14 on Mon, 03 Feb 2020 06:30:44 -0800

Android 9.0 source APP startup process

The relevant source path used in this article: Android 9.0 app startup source code 1. Introduction to startup 1.1. Startup process: Click the desktop App icon, and the Launcher process uses Binder IPC to initiate the startActivity request to the system server process; After receiving the request, t ...

Posted by fnbcprog on Sat, 01 Feb 2020 03:50:50 -0800

Socket realizes file transfer

Socket realizes file transfer 1. client Connect to the server through new Socket("ip",port) Create file input stream read file Create an output stream that returns to the socket Write article name, length and other attributes Read and write articles Closed flow package com.company; import javax.xml.crypto.Dat ...

Posted by irandoct on Fri, 31 Jan 2020 11:38:13 -0800

21 days to build a distributed crawler (I) urllib Library

1.1.usage of urlopen function #encoding:utf-8 from urllib import request res = request.urlopen("https://www.cnblogs.com/") print(res.readlines()) #urlopen Parameters #def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, # *, cafile=None, capath=None, cadefault=False, context=None): 1.2.urlretriev ...

Posted by greywire on Thu, 30 Jan 2020 20:29:55 -0800

Linux Kernel 2.6.9 source code analysis -- accept

Linux Kernel 2.6.9 source code analysis – accept Let's take a look at the prototype: int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)sockfd: this socket is used to listen to a port. When a client connects with the server, it uses this port number, which is associated with the so ...

Posted by ldoozer on Thu, 30 Jan 2020 04:18:10 -0800

[Netty learning notes] X. use of codec

Basic explanation Component design of Netty: the main components of Netty are Channel, EventLoop, ChannelFuture, ChannelHandler, ChannelPipe, etc. ChannelHandler acts as a container for application logic that processes inbound and outbound data. For example, to implement the ChannelInboundHandler inte ...

Posted by itsjareds on Wed, 29 Jan 2020 20:16:37 -0800

Linux file and directory operation commands

1,cd (change directory) switch to the specified directory -Return to last directory .. Return to the upper directory Enter to return to home directory /Root directory 2,cp (copy) copy a file or directory -r -R Recursively copy the contents of this directory and its subdirectories -p Copy past with file properties -f Force copy without aski ...

Posted by 0riole on Wed, 29 Jan 2020 03:46:43 -0800

CoreOS Configuration Docker API TLS Certification

We often use Portainer to manage the docker environment, Jenkins to build and deploy the docker automatically, and the Docker API is used for remote management. Usually we just open a 2375 (usually) port without security protection, which is dangerous and can lead to remote hijacking attacks.Then we need to configure the TLS certified 2376 (usu ...

Posted by krotkruton on Wed, 22 Jan 2020 08:29:43 -0800

UDP broadcast search LAN device information

Article directory What is UDP? UDP core API Introduction of datagram socket construction method Common methods of datagram socket The construction method of datagram packet Common methods of datagram packet Unicast, broadcast, multicast Case introduction test What is UDP? It is a user datagram ...

Posted by teebo on Sun, 19 Jan 2020 23:26:42 -0800