Skip to main content
Version: 2.x

Interface ISocket

Declaration
public interface ISocket

Derived:
OdinNative.Unity.OdinSocket, OdinNative.Wrapper.Socket.Socket

Properties

Id

Socket id

Declaration
ulong Id { get; }

Handle

Declaration
OdinSocketHandle Handle { get; }

Parent

Default value null indicates root or not set

Declaration
IPeer Parent { get; }

Room

Declaration
IRoom Room { get; }

IsRemote

Indicates whether the socket was opened by the remote side (inbound)

Declaration
bool IsRemote { get; }

Methods

GetBaseSocket<T>()

Get the underlying OdinNative.Wrapper.Socket.Socket

Declaration
T GetBaseSocket<T>() where T : ISocket
Returns

<T>: native wrapper socket

Type Parameters
  • T

OnSocket(IRoom, SocketMessageEventArgs)

Declaration
void OnSocket(IRoom room, SocketMessageEventArgs args)
Parameters
TypeName
OdinNative.Wrapper.IRoomroom
OdinNative.Wrapper.Socket.SocketMessageEventArgsargs

Events

OnMessageReceived

Odin socket received message

Declaration
event OnSocketMessageReceivedDelegate OnMessageReceived
Event Type

OdinNative.Wrapper.OnSocketMessageReceivedDelegate