Class SocketEndpoint
Inherited Members
Namespace: Microsoft.MixedReality.SpectatorView
Assembly: cs.temp.dll.dll
Syntax
public sealed class SocketEndpoint
Constructors
SocketEndpoint(SocketerClient, TimeSpan, String, Int32)
Declaration
public SocketEndpoint(SocketerClient socketerClient, TimeSpan timeoutInterval, string address, int sourceId = 0)
Parameters
Type | Name | Description |
---|---|---|
Socketer |
socketerClient | |
Time |
timeoutInterval | |
String | address | |
Int32 | sourceId |
Properties
Address
IP address for the socket endpoint
Declaration
public string Address { get; }
Property Value
Type | Description |
---|---|
String |
IsConnected
Returns true if the socket endpoint is connected, otherwise false
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CheckConnectionTimeout(DateTime)
Checks whether the associated client is still active. If not, the client is disconnected.
Declaration
public void CheckConnectionTimeout(DateTime currentTime)
Parameters
Type | Name | Description |
---|---|---|
Date |
currentTime | Time to use relative to last active timestamp to determine whether to disconnect |
Disconnect()
Call to set the socket endpoint state to disconnected
Declaration
public void Disconnect()
QueueIncomingMessages(ConcurrentQueue<IncomingMessage>)
Call to start enqueuing incoming messages
Declaration
public void QueueIncomingMessages(ConcurrentQueue<IncomingMessage> incomingQueue)
Parameters
Type | Name | Description |
---|---|---|
Concurrent |
incomingQueue | Queue used for enqueuing messages |
Send(Byte[])
Call to send data to this endpoint
Declaration
public void Send(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | data to send |
StopConnectionAttempts()
Call to prevent additional attempts at connecting. Note: if no connection has been established, calling this function will prevent establishing a connection.
Declaration
public void StopConnectionAttempts()
StopIncomingMessageQueue()
Call to stop enqueuing incoming messages
Declaration
public void StopIncomingMessageQueue()