CInternetServer::OnRead Method  
 
virtual void OnRead(
  SOCKET hSocket  
);

A virtual method that is invoked when a client sends data to the server.

Parameters

hSocket
A handle to the client socket.

Return Value

None.

Remarks

The OnRead event handler is invoked when a client sends data to the server. To implement an event handler, the application should create a class derived from the CInternetServer class, and then override this method. All server applications must implement an OnRead event handler to process the data sent by the client.

This event occurs whenever there is data available to be read from the client. The server application reads the data using the Read or ReadLine method, and can then send data back to the client using the Write or WriteLine method.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock12.h
Import Library: cswskv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also