Class SocketCollection
Intern socket dictionary
Implements:
System.Collections.Generic.IReadOnlyCollection<OdinNative.Wrapper.Socket.Socket> , System.Collections.Generic.IEnumerable<OdinNative.Wrapper.Socket.Socket> , System.Collections.IEnumerable , System.Collections.Generic.IEqualityComparer<OdinNative.Wrapper.Socket.Socket>
Properties
this[ulong]
Get socket by Id
Count
Count of sockets in the collection
IsRemoveOnly
Indicates whether elements can be removed from the collection
Methods
Add(Socket)
Add a socket to the collection
Returns
System.Boolean: true on success or false
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.Socket.Socket | item | socket to add |
GetByLabel(int)
Try to get socket by label
Returns
OdinNative.Wrapper.Socket.Socket: Socket
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | key | Socket OdinNative.Wrapper.Socket.Socket.Label?text=label |
Clear()
Free and empty the collection
Contains(Socket)
Determines whether the socket is in the collection
Returns
System.Boolean: true on success or false
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.Socket.Socket | item | socket |
Equals(Socket, Socket)
Compares two sockets by hash code
Returns
System.Boolean: is equal
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.Socket.Socket | x | socket x |
| OdinNative.Wrapper.Socket.Socket | y | socket y |
GetEnumerator()
Get enumerator for iteration
Returns
System.Collections.Generic.IEnumerator<OdinNative.Wrapper.Socket.Socket>: enumerator
GetHashCode(Socket)
Default GetHashCode
Returns
System.Int32: hash code
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.Socket.Socket | obj | socket |
Remove(ulong)
Removes the socket from this collection
Returns
System.Boolean: is removed
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64 | id | socket id OdinNative.Wrapper.Socket.Socket.GetSocketId() |
Reset(Socket)
Reset a socket
Returns
System.Boolean: true if socket to reset found
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.Socket.Socket | socket | socket |
Reset(ulong)
Reset a socket
Returns
System.Boolean: true if socket to reset is found
Parameters
| Type | Name |
|---|---|
System.UInt64 | id |
Implements
System.Collections.Generic.IReadOnlyCollection<OdinNative.Wrapper.Socket.Socket>System.Collections.Generic.IEnumerable<OdinNative.Wrapper.Socket.Socket>System.Collections.IEnumerableSystem.Collections.Generic.IEqualityComparer<OdinNative.Wrapper.Socket.Socket>