socket

Learn about socket, we have the largest and most updated socket information on alibabacloud.com

Linux C Implementation File transfer

FILE_SERVER.C File transfer Order Server sample //File_ SERVER.C File transfer Order Server sample//////////////////////////////////////////////////////////////////////////////////////This file is the code for the server#include //For

Get Linux host IP address in C language

#include ; #include ; #include ; #include ; #include ; #include ; #include ; #include ; #include ; #define ETH_NAME "eth0" int main () {int sock; struct sockaddr_in sin; struct

Linux under C programming: socket instance

Client: #include #include #include #include #include #define SERVER_PORT 20000//define the Defualt con Nect Port ID #define CLIENT_PORT ((20001+rand ())%65536)//define the Defualt CLIENT port as a random port #define BUFFER_SIZE 255 #

LAN chat software (winsocket)

Program Implementation function: LAN chat software, start to find online devices, and can carry out simple text chat. In fact, the following diagram has explained the most functional principles of the program. Program diagram of Core class I

A sniffer based on the original socket

Sniffer this code I have written last year, this semester is not very busy, conveniently review the network, and then try to write again. In fact, when writing a sniffer, the main thing is to set the NIC to promiscuous mode. On this basis, the

Muduo Library Source Analysis (ii) service end

I. TCPServer class: Manage all TCP customer connections, tcpserver for direct use by users, life cycle by the user Direct control. The user simply sets the appropriate callback function (such as message processing Messagecallback) and then

Code to implement the ping command

#include #include #include #include # Include #include #include #include #include #include #include #inc Lude #include #include #define PACKET_SIZE 4096 /* */#define MAX_WAIT_TIME 5 #define Max_no_packets 3 char

TCP connection Detection keepalive and heartbeat packs

Using the TCP/C mode software, the connection between the two sides in the connection idle state, if either side of the accidental crash, when the machine, network cable disconnect or router failure, the other side can not know that the TCP

C + + Poco library Chinese Programming Reference Guide (11) How to use the reactor framework?

1 Reactor Framework Overview The reactor framework in POCO is designed based on the reactor design pattern. In which the event generated by a Socket is sent by Handler to the method of the specified object, as a callback. 2 Light said not practice

C + + Poco library Chinese Programming Reference Guide (10) How to use the TCPServer framework?

1 TCPServer Framework Overview The POCO library provides a tcpserver framework to build a custom TCP server. TCPServer maintains a connection queue, a connection thread pool. The connection thread is used to process the connection, and the

C + + Poco library Chinese Programming Reference Guide (8) rich socket programming

1 Socket in POCO The POCO is rich in Socket encapsulation. Its inheritance relationship is as follows: This article only introduces Streamsocket, ServerSocket, Datagramsocket 2 Poco::net::serversocket A serversocket is a Socket with a lower

C + + Poco library Chinese Programming Reference Guide (7) poco::net::D atagramsocket

1 constructors Create a disconnected IPv4 datagram Socket: Datagramsocket (); Creates a datagram Socket that specifies the IP type (IPV4 or IPV6): Explicit Datagramsocket (ipaddress::family Family); Create a datagram Socket with a specified

C + + Poco library Chinese Programming Reference Guide (5) poco::net::socketaddress

1 enumeration The maximum address length, which is analogous to the definition in poco::net::ipaddress, but it refers to ' struct SOCKADDR_IN6 Enum { max_address_length = #if defined (Poco_have_ipv6) sizeof (struct

C + + Poco library Chinese Programming Reference Guide (3) poco::net::socket

1 SelectMode Enum SelectMode ///the Mode argument to poll () and select (). { Select_read = 1, select_write = 2, select_error = 4 }; 2 Socketlist typedef std::vector Socketlist; 3 constructors Uninitialized

How the Java socket input stream detects EOF

For InputStream's read (b, off, Len) method public int read (byte[] b, int off, int len) throws Ioexception,javadoc description is: If Len is zero, the then no bytes are read and 0 is returned; Otherwise, there is a attempt to read at least one

The message subsystem of wildfly evaluation

Wildfly, formerly JBoss as, from V8 to the difference from JBoss EAP, renamed to Wildfly. HORNETQ is an independent message-oriented middleware developed by JBoss and is integrated into wildfly as a message subsystem. HORNETQ fully supports

How to use the socket to quickly determine a database connection

When people do projects, they are usually related to the database. And believe that many people in the code to open the database, did not determine the success of the database connection. If it's okay to write right, but there's a mistake, it's

Java 7 SDP: Once written, running everywhere, sometimes also run super dazzle!

This article will briefly introduce the Java Socket Direct protocol (Sockets Direct PROTOCOL,SDP) introduced in the Java 7 SDK, and this new technology is a very exciting breakthrough. If you want to native access to InfiniBand's remote Direct

How to use Java to test network connectivity

Overview In network programming, sometimes we need to judge the connectivity between two machines, or the network accessibility of a machine to another machine. In a system-level test, we often use the Ping command to do the validation. Although

VC network programming based on Winsock API

With the rapid development of computer information technology, the Internet has become more and more closely related to the work and life of human society, and it has been an important way and means for people to acquire and exchange information. So

Total Pages: 45 1 .... 17 18 19 20 21 .... 45 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.