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

A virtual method that is invoked when the client is ready to receive data.

Parameters

hSocket
A handle to the client socket.

Return Value

None.

Remarks

The OnWrite event handler is invoked when a client is ready to receive data. 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 immediately after the OnConnect event and if security is enabled, after the TLS handshake has completed. It is used to notify the server application that the client is ready to receive data, and may be used to send an initial message to the client, typically identifying the server that it has connected to. In most cases, the OnWrite event handler will only be invoked once over the lifetime of the client session.

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