Filter: C++  Pascal  C#  VB.NET  Java  Java ME  ActiveX  DLL 



InetTransport.OnDisconnected

InetTransport     See also    


This event is used to notify the application that a connection with given peer has been closed.

Declaration

[C++]
    typedef void (STDCALLCONV *IPCSocketDisconnectedEvent)(void* UserData, void* Sender, IPCSocketDir Direction, char* RemoteHost, unsigned short RemotePort);
    void setOnDisconnected(IPCSocketDisconnectedEvent Value, void * UserData = NULL);
    IPCSocketDisconnectedEvent getOnDisconnected(void * *UserData);

[Pascal]
    property OnDisconnected: TIPCSocketDisconnectedEvent;
    TIPCSocketDisconnectedEvent = procedure (Sender : TObject; Direction : TIPCSocketDir; RemoteHost : string; RemotePort : word) of object;

[VB6]
    Private Sub IIPCXInetTransportEvents.OnDisconnected(ByVal Direction As IPCXControl.IPCXSocketDir, ByVal RemoteHost As String, ByVal RemotePort As Long)

[ActiveX]
    void IIPCXInetTransportEvents.OnDisconnected( [in] IPCXSocketDir Direction, [in] BSTR RemoteHost, [in] long RemotePort);

[C#]
    public IPCSocketDisconnectedEvent OnDisconnected;
    public delegate void IPCSocketDisconnectedEvent(object Sender, IPCSocketDisconnectedEventArgs Args);
    public class IPCSocketDisconnectedEventArgs : EventArgs
    {
        public IPCSocketDir Direction,
        public string RemoteHost,
        public int RemotePort
    }

[VB.NET]
    Public Event OnDisconnected As IPCSocketDisconnectedEvent
    Public Delegate Sub IPCSocketDisconnectedEvent(ByVal Sender As Object, ByVal Args As IPCSocketDisconnectedEventArgs)
    Public Class IPCSocketDisconnectedEventArgs
        Public Direction As IPCSocketDir
        Public RemoteHost As String
        Public RemotePort As Integer
    End Class

[Java]
    public class IPCSocketDisconnectedEvent {
        public int getDirection();
        public String getRemoteHost();
        public int getRemotePort();
    }
    public abstract interface IPCSocketDisconnectedListener {
        public void socketDisconnected(IPCSocketDisconnectedEvent e);
    }
    public void removeSocketDisconnectedListener(IPCSocketDisconnectedListener l);
    public void addSocketDisconnectedListener(IPCSocketDisconnectedListener l);

[Java ME]
    public class IPCSocketDisconnectedEvent {
        public int getDirection();
        public String getRemoteHost();
        public int getRemotePort();
    }
    public abstract interface IPCSocketDisconnectedListener {
        public void socketDisconnected(IPCSocketDisconnectedEvent e);
    }
    public void removeSocketDisconnectedListener(IPCSocketDisconnectedListener l);
    public void addSocketDisconnectedListener(IPCSocketDisconnectedListener l);

[DLL]
    not implemented;

Parameters

  • UserData - application-defined data that is passed back to the callback function.
  • Direction - specifies whether the connected sockets was initiating or accepting connection
  • RemoteHost - contains IP address of remote socket
  • RemotePort - contains port number of the remote socket

Description

    This event is used to notify the application that SocketTransport or HTTPTransport has closed connection with remote host. The event is fired only if the connection was actually established and a handshake (for SocketTransport) was successful. Note, that if the application sets AllowConnection parameter of OnConnected event to false, OnDisconnected event is fired anyway.

    NOTE: The event is fired in context of transport (worker) thread (not messenger thread).

See also:     OnConnected