Tag:Server Send

  • A guide to curl

    Time:2021-1-10

    Reading guide Curl is a common command-line tool used to request web servers. Its name means the URL tool of the client. Its function is very powerful, and there are dozens of command line parameters. If you are proficient, you can completely replace graphical interface tools such as postman. This paper introduces its main command […]

  • Getting client IP with PHP

    Time:2020-12-25

    REMOTE_ Addr is the IP address when your client “shakes hands” with your server. If anonymous proxy is used, remote_ Addr will display the IP of the proxy server (proxy can be used in nginx_ set_ header X-Forwarded-For $remote_ Addr; to solve the problem).HTTP_ CLIENT_ IP is the HTTP header sent by the proxy server. […]

  • 36. Springboot configures CORS to solve cross domain requests

    Time:2020-11-29

    CORS (cross origin resource sharing) “cross domain resource sharing” is a W3C standard. It allows the browser to send Ajax requests to cross domain servers, breaking the restriction that Ajax can only access resources in the site. CORS is used in many places. JS payment of wechat payment is to send cross domain request to […]

  • The MAC terminal is connected to the server

    Time:2020-9-20

    After the MAC terminal is connected with the remote server, it may be disconnected because there is no data interaction with the server for a period of time. Now, the following methods can be used to maintain the long-term connection between the terminal and the remote server. Edit “SSH”_ Config “file: sudo vi /etc/ssh/ssh_config Under […]

  • Specific meaning of parameters in HTTP request header

    Time:2020-9-17

    As a front-end development, it is necessary to understand that browsers send HTTP requests. 7 steps of HTTP request 1. Establish TCP link 2. The browser sends a request (get / sample)/ hello.jsp HTTP/1.1) 3. Request header sent by browser 4. Server sends response (HTTP / 1.1200 OK) 5. The server sends the response header […]

  • Service registration, discovery, heartbeat

    Time:2020-8-6

    Using akka to achieve service registration, discovery and heartbeat Message class: package org.examplecase class RegisterWorkerInfo(id: String, cpu: Int, ram: Int);case class WorkerInfo(val id: String, val cpu: Int, val ram: Int) { var lastheartbeat: Long = System.currentTimeMillis ();};case object RegisteredWorkerInfo;case object SendHeartBeat;case object StartTimeOutWorker;case object RemoveTimeOutWorker; Case class heartbeanpackage (ID: String); server master: package org.exampleimport java.util.concurrent […]

  • How to use curl

    Time:2020-7-22

    How to use curl brief introduction Curl is a common command-line tool used to request web servers. Its name is the meaning of the client’s URL tool. It is very powerful, with dozens of command line parameters. If skilled, it can completely replace the graphical interface tools like postman. This paper introduces its main command […]

  • Building a simple HTML5 chat room

    Time:2020-7-7

    The front words A web im conforming to XMPP protocol was written before, but jsjac was used, and jabber client was used in the background. It is found that nodejs event mode is more suitable for web IM client. The traditional Ajax polling mechanism will be replaced by full duplex websocket sooner or later, so […]

  • Front end caching mechanism

    Time:2020-4-24

    What is caching? A cache can be considered a copy of a resource. It is different from the local cache, such as local storage. The local cache is more about data records and less data. The purpose of cache is to reduce requests, more for files and more storage.The front-end cache can be divided into […]

  • Mac terminal keeps connection with server

    Time:2020-3-26

    After the terminal of MAC connects with the remote server, it may be disconnected due to no data interaction with the server for a period of time. Now, the following methods can be used to maintain the long-term connection between the terminal and the remote server. Edit the SSH? Config file: sudo vi /etc/ssh/ssh_config Under […]

  • 20170627-http and browser caching mechanism

    Time:2020-2-7

    Browser caching mechanism Expires policy Expires is the web server response header field, which tells the browser that the browser can read data directly from the browser cache before the expiration time when responding to HTTP requests without requiring another request. The web server tells the browser to use the cache file before GMT: Tue, […]

  • Basic socket programming of C

    Time:2020-1-28

    The sample program is a synchronous socket program with simple functions. It only sends a message from the client to the server, and the server returns a message to the client. It is a simple example and also the most basic socket programming process. Simple steps: 1. Create an endpoint object with the specified port […]