TCP/IP network programming learning note disconnect socket

I. TCP based half shutdown 1. Problems caused by unilateral disconnection The close function of Linux and the closesocket function of Windows mean complete disconnection. Complete disconnection means that the input and output streams are disconnected at the same time. If host A no longer needs to transmit data to host B, and ...

Posted by kpzani on Wed, 27 Nov 2019 17:56:08 +0100

Create chat programs step by step 1 - Create simple chat programs using processes and shared memory

linux recently learned about interprocess communication, so decided to create a simple chat program with the help of processes and shared memory and following the producer-consumer model.The following is a brief description of the program ideas.The first is the server-side program, which creates two processes. Process 1 receives messages from c ...

Posted by sirfartalot on Thu, 21 Nov 2019 05:44:13 +0100

Multi instance implementation of mariadb based on binary installation

Multi instance implementation of mariadb based on binary installation   1. mariadb version: 10.2.23   2. shell script for binary installation of mariadb #!/bin/bash id mysql &>/dev/null if [ `echo $?` -ne 0 ];then userdel -r mysql &>/dev/null useradd -r -u 336 -s /sbin/nologin -d /data/mysql mysql &amp ...

Posted by benkillin on Wed, 20 Nov 2019 17:31:29 +0100

[SpringBoot+Netty] implementation click the front page button to call the Client to send messages to the Server

Code background The following functions need to be realized: click the page button in the foreground, and the background will send instructions to the lower computer to control the Internet of things devices. In fact, this logic can be applied to many scenarios. The process of my solution is as follows: The foreground uses On ...

Posted by subesc on Sun, 17 Nov 2019 16:51:45 +0100

python base (30): other methods of sticking, socket s

1. Sticky 1.1 sticking phenomenon Let's start by making a program that executes commands remotely based on tcp (commands ls-l; l l l l l; pwd) When multiple commands are executed at the same time, it is likely that only part of the result will be obtained, and when other commands are executed, another part of the result will be received, which ...

Posted by justice1 on Sat, 16 Nov 2019 10:44:02 +0100

Getting started with java distributed calling and customizing RPC framework based on reflection socket JKD dynamic proxy

Using IDEA, Myeclipse Write service interface HelloService Server implementation class Write the calling class of the server package whu; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.lang.reflect.Method; import java.net.ServerSocket; import java.net.Socket; public class RpcFramework { //Regi ...

Posted by figo2476 on Wed, 13 Nov 2019 20:06:05 +0100

Netty application: a simple C/S communication model

Use Netty to realize a simple communication model. Look at the program: 1. Server side: Class Server: import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import ...

Posted by simmosn on Tue, 12 Nov 2019 17:55:15 +0100

socket programming 15: how to keep the server listening to the client's requests?

The previous program, no matter the server or the client, has a problem, that is, it exits immediately after processing a request, which is not of great practical significance. Can you always accept requests from clients like a Web server? Yes, just use the while loop. Modify the echo program so that the server can continuously ...

Posted by smacpettit on Mon, 11 Nov 2019 19:48:26 +0100

java041: java or browser do the client to transfer data to each other

First, use java as the server, use browser as the client, let browser link to java Server Every browser will send a "secret code" first when sending a request. If the other party can match the secret code, it is his own person, and then he will send data This code is our http protocol Use java as the client and tomcat ...

Posted by very_new_user on Sun, 10 Nov 2019 23:13:33 +0100

Docker use - two hours to get started

Welcome to the original link: https://mp.weixin.qq.com/s/eAJpnEfjflVr76iPVHN6rA  This is a personal note of sorting and thinking after watching the above links   Advantages of docker container More efficient use of system resources Because the container does not need additional overhead such as hardware virtualization and runni ...

Posted by nosher on Sat, 09 Nov 2019 12:52:47 +0100