Java SE foundation UDP and TCP

summary Java and C#, can use UDP and TCP protocols for network communication. This chapter only describes the basic use of UDP and TCP. Compared with various standard / non-standard TCP, ModbusTCP (occupying 502 port) and lower computer custom network communication protocols required when writing the upper computer, Java TCP and UDP progra ...

Posted by Duswa on Tue, 08 Mar 2022 21:23:45 +0100

Under linux, the designated network card can send data by forging udp packets

1. Include header file #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include <time.h> #include <stdlib.h> #include <stdbool.h> 2. Set src and dest, and define a global socket at the same time. We take the ...

Posted by y2yang on Mon, 07 Mar 2022 23:25:04 +0100

netty encoding and decoding and packet sticking and unpacking processing

netty encoding and decoding and packet sticking and unpacking processing Codec When you send or receive a message through Netty, a data conversion will occur. The inbound message will be decoded: from byte to another format (such as java object); If it is an outbound message, it will be encoded into bytes. Netty provides a series of practi ...

Posted by mise_me_fein on Fri, 04 Mar 2022 14:30:26 +0100

[computer network] - Protocol layering

1. Agreement: an agreement. 2. Protocol layering: (1) OSI (open system interconnection) seven layer model (2) TCP/IP five layer model (3) TCP/IP four layer model Layer namefunctionRelated agreementsapplication layerResponsible for communication between applications HTTP SSH DNS Display layerConvert the network datagram into the package req ...

Posted by mrpickleman on Fri, 04 Mar 2022 14:21:06 +0100

WebService concise tutorial

There are thousands of people in the vast sea. Thank you for seeing here this second. I hope my article is helpful to you! May you keep your love and go to the mountains and seas in the future! 👀 preface Because some time ago, we need to use webService to call other system api interfaces of the company, but the request method is differe ...

Posted by ericdorman on Tue, 01 Mar 2022 02:07:39 +0100

Socket network programming learning notes (10) simple chat room case

1. Data transmission design of chat room Necessary conditions: client and serverNecessary constraints: data transfer protocolPrinciple: the server listens to the message source, the client links to the server and sends a message to the server 1.1 data interaction between client and server The client sends a message to the server, and the se ...

Posted by VMinder on Mon, 28 Feb 2022 02:58:59 +0100

Python implementation file downloader

Python - implement file downloader Supplementary knowledge points tcp servers generally need to be bound, otherwise the client cannot find the servertcp clients are generally not bound, because they send out the linked server, so as long as the ip, port and other information of the server is determined, the local client can be randomly connec ...

Posted by ccl on Sat, 19 Feb 2022 20:53:41 +0100

Network programming (realize the mutual communication of LAN and send and receive data)

linux network programming 1, Understanding of ip and ports What is socket? 1). Socket is translated into socket, socket and row plug in English. (because there are many kinds of sockets, it seems that there are many protocols. These protocols must be consistent before communication can be carried out.) Network programming - > socket ...

Posted by dsdsdsdsd on Sat, 12 Feb 2022 03:23:08 +0100

Network programming - Understanding

computer network It refers to a computer system in which multiple computers and their external devices with independent functions in different geographical locations are connected through communication lines to realize resource sharing and information transmission under the management and coordination of network operating system, network manag ...

Posted by BAM1979 on Thu, 10 Feb 2022 06:43:36 +0100

Java Socket programming from single thread to multi thread to realize chat applet

Single threaded example Realize function For 1-to-1 chat communication between the server and the client, you need to run the server first and then the client. When the user enters bye, close the socket and terminate the chat. Specific operation process Start the server, create a ServerSocket, block the accept method, and wait for the c ...

Posted by codebuilder on Sat, 05 Feb 2022 02:51:37 +0100