Enum NetworkEvent.Type
Types of network events that can be returned by PopEvent(out NetworkConnection, out DataStreamReader).
Namespace: Unity.Networking.Transport
Assembly: Unity.Networking.Transport.dll
Syntax
public enum NetworkEvent.Type : short
Fields
Name | Description |
---|---|
Connect | Connection has been successfully established. From this point on it's okay to send data on the connection. Returned after calling Connect(NetworkEndpoint, NativeArray<byte>) when the connection was successful. Note that servers do not get this event (new connections are notified through the Accept(out NativeArray<byte>) call). |
Data | A message was received on the connection. The contents of the message can be read
from the Unity.Collections.DataStreamReader that was returned along with the event.
Furthermore, the pipeline on which the message was received will also be returned
(for the variants of |
Disconnect | Connection has been closed, or has failed to be established. The reason for the disconnection can be read as a single byte off the Unity.Collections.DataStreamReader obtained along with the event. That single byte will represent a value from the DisconnectReason enum. |
Empty | No event. Returned when there are no more events to pop. |