Saltar al contenido principal
Versión: 20 R9 BETA

TCPEvent

The TCPEvent class provides information about events occurring during the lifecycle of a TCP connection. It is generated when a TCPConnection is opened and is typically utilized in callbacks such as onConnection, onData, onError, and others.

Historia
LanzamientoModificaciones
20 R9New ip, and port attributes
20 R8Clase añadida

Objeto TCPEvent

A TCPEvent object is immutable and non-streamable.

Las siguientes propiedades están disponibles:

data : Blob
los datos asociados al evento
ip: Text
the IP address of the remote machine
port : Number
the port number of the remote machine
type : Text
el tipo del evento

.data

data : Blob

Descripción

La propiedad .data contiene los datos asociados al evento. It is only valid for events of type "data".

nota

When working with low-level TCP/IP connections, keep in mind there is no guarantee that all data will arrive in a single packet. Data arrives in order but may be fragmented across multiple packets.

.ip

ip: Text

Descripción

The .ip property contains the IP address of the remote machine.

.port

port : Number

Descripción

The .port property contains the port number of the remote machine.

.type

type : Text

Descripción

La propiedad .type contiene el tipo del evento. Los valores posibles son:

  • "connection": Indicates that a TCPConnection was successfully established.
  • "data": Indicates that data has been received.
  • "error": Indicates that an error occurred during the TCPConnection.
  • "close": Indicates that the TCPConnection has been properly closed.
  • "terminate": Indicates that the TCPConnection is about to be released.