Tag:socket

  • Analyze the decoupling of socket server module written by go and the design of basic module

    Time:2020-7-11

    Decoupling of server – logical distribution through router + controller In the actual system project engineering, we should try our best to avoid unnecessary coupling when we write code. Otherwise, when you update and maintain the code in the future, you will find that you are stuck in a quagmire. If you change something casually, […]

  • The background and advantages of spring boot series 01

    Time:2020-3-9

    No reprint without permission Original author: Alphabet blog The complete series of this article is from: spring boot in depth 1、 Preliminaries Outline of this section The background of spring boot What has spring boot changed Main features of spring boot Steps of integrating third-party open source components with spring boot 2、 The background of […]

  • (1) How to implement a single process blocking network server

    Time:2020-2-1

    Summary In order to better understand network programming and write a high-performance service, we need to spend some time to understand the whole process of the server processing the client and understand some key terms. Originally, we wanted to add some basic theoretical knowledge in this article, worried that too long is not conducive to […]

  • The record of socket stepping on the hole

    Time:2020-1-16

    Socket brief introduction Socket (duplex protocol)Two programs in the network exchange data through a two-way connection. We call one end of the connection socket Socket characteristics Built in connection retention Can realize two-way communication Socket classification Socket based on TCP Socket based on UDP Socket based on rawip Socket based on link layer Socket actual […]

  • [business learning] analysis of the way to improve the performance of server concurrent IO — from the basis of network programming to epoll

    Time:2019-12-22

    baiyan From the basic concept of network programming We often use HTTP protocol to transmit data of various formats. In fact, the bottom layer of HTTP application layer protocol is based on TCP protocol of transmission layer. TCP only treats these data as a series of meaningless data streams. Therefore, we can say:The client and […]

  • Best practice in dealing with network timeout

    Time:2019-12-7

    For users on the cloud, the timeout problem in the business log is often difficult to deal with, because 1) the problem may be in the cloud infrastructure layer, or in the business software layer, and the scope of troubleshooting is very wide; 2) such problems are often non recurring problems, and it is difficult […]

  • The implementation method of continuous transmission of large file with breakpoint in golang socket

    Time:2019-12-3

    In our daily programming, we will definitely encounter the use of socket to transfer the file content. If it is a large file, it can’t be transferred to half of it because it is broken for some reason, and then transfer the file content from the new one. Yes, we need to renew the transmission, […]

  • Make a simple chat room with node (with websocket tutorial)

    Time:2019-11-27

    I’ve been talking about theory before. Let’s talk about dry goods this time.By the way, let’s start with the zero row Vue series and write it later. After all, Youshen is Youshen. It’s really difficult to simulate Vue for a while. Go on to the point. (a node environment is needed here, on the computerIf […]

  • Analysis of okhttp source code (I) simple analysis of request and response process

    Time:2019-11-27

    This article briefly introduces the request and response process of okhttp. Article basedOkHttp3.14.3Edition 0 Preface ​ OkHttpAs the current Java based programming network request library, its popularity is needless to say. The articles and codes about the use, encapsulation and source code analysis of okhttp on the Internet have been put together by hundreds of […]

  • Summary of Linux socket common functions

    Time:2019-11-23

    ======== TCP ======== TCP_Server socket() bind() listen() accept() write() read() Close() and shutdown() TCP_Client socket() connect() Send() and recv()Close() and shutdown() ======== UDP ======== UDP_Server socket() bind() Sendto() and recvfrom()Close() and shutdown() UDP_Client socket() Sendto() and recvfrom()Close() and shutdown() getpeername() gethostname() ——————————————————————————–socket() We use the system call socket () to get the file descriptor:#include<sys/types.h>#include<sys/socket.h>int socket(int […]

  • Socket programming tutorial in simple Ruby

    Time:2019-11-19

    Ruby provides two levels of network access services. At the bottom, you can access the operating system. It allows you to implement the basic socket support for connection oriented and Connectionless Protocols for clients and servers. Ruby supports network protocols of applications, such as FTP, HTTP, etc. Whether it’s high-level or low-level. Ruby provides some […]

  • From simple to highly concurrent server (1)

    Time:2019-11-6

    A single threaded echo server Let’s start with a simple server.It can take a customer’s connection, receive a message, send it back, close the connection – done. We use BSD socket, which is common on Linux and IOS / OSX, to write the code of this server. The main part is as follows: (c + […]