Table of Contents

Class SimpleSocket

Namespace
Stride.Engine.Network
Assembly
Stride.Engine.dll

Manages socket connection+ack and low-level communication. High-level communication is supposed to happen in SocketMessageLayer.

public class SimpleSocket : IDisposable
Inheritance
SimpleSocket
Implements
Extension Methods

Fields

Connected

public Action<SimpleSocket> Connected

Field Value

Action<SimpleSocket>

Disconnected

public Action<SimpleSocket> Disconnected

Field Value

Action<SimpleSocket>

Properties

ReadStream

public Stream ReadStream { get; }

Property Value

Stream

RemoteAddress

public string RemoteAddress { get; }

Property Value

string

RemotePort

public int RemotePort { get; }

Property Value

int

WriteStream

public Stream WriteStream { get; }

Property Value

Stream

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

StartClient(string, int, bool)

public Task StartClient(string address, int port, bool needAck = true)

Parameters

address string
port int
needAck bool

Returns

Task

StartServer(int, bool, int)

public Task StartServer(int port, bool singleConnection, int retryCount = 1)

Parameters

port int
singleConnection bool
retryCount int

Returns

Task