Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    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
    Name Description
    Fields
    Connected
    Disconnected
    Properties
    ReadStream
    RemoteAddress
    RemotePort
    WriteStream
    Methods
    Dispose()
    StartClient(String, Int32, Boolean)
    StartServer(Int32, Boolean, Int32)
    | Improve this Doc View Source

    Fields


    Connected

    public Action<SimpleSocket> Connected
    Field Value
    Type Description
    System.Action<SimpleSocket>

    Disconnected

    public Action<SimpleSocket> Disconnected
    Field Value
    Type Description
    System.Action<SimpleSocket>
    | 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()

    public void 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

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation