SimpleSocket Class
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.
System.Object →
SimpleSocket
Derived from SimpleSocket:
public class SimpleSocket : IDisposable
|
Improve this Doc
View Source
Fields
Connected
public Action<SimpleSocket> Connected
Field Value
Disconnected
public Action<SimpleSocket> Disconnected
Field Value
|
Improve this Doc
View Source
Properties
ReadStream
public Stream ReadStream { get; }
Property Value
Type |
Description |
System.IO.Stream |
|
RemoteAddress
public string RemoteAddress { get; }
Property Value
Type |
Description |
System.String |
|
RemotePort
public int RemotePort { get; }
Property Value
Type |
Description |
System.Int32 |
|
WriteStream
public Stream WriteStream { get; }
Property Value
Type |
Description |
System.IO.Stream |
|
|
Improve this Doc
View Source
Methods
Dispose()
StartClient(String, Int32, Boolean)
public async Task StartClient(string address, int port, bool needAck = true)
Parameters
Type |
Name |
Description |
System.String |
address |
|
System.Int32 |
port |
|
System.Boolean |
needAck |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
StartServer(Int32, Boolean, Int32)
public async Task StartServer(int port, bool singleConnection, int retryCount = 1)
Parameters
Type |
Name |
Description |
System.Int32 |
port |
|
System.Boolean |
singleConnection |
|
System.Int32 |
retryCount |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Extension Methods