Skip to main content

Class SocketFactory

Creates an instance of

Inheritance
System.Object
Syntax
public abstract class SocketFactory : MonoBehaviour

Properties

MaxPacketSize

Max size for packets sent to or received from Socket Called once when Sockets are created

Declaration
public abstract int MaxPacketSize { get; }

Methods

CreateServerSocket()

Creates a to be used by on the server

Declaration
public abstract ISocket CreateServerSocket()
Returns
TypeDescription
Mirage.SocketLayer.ISocket

GetBindEndPoint()

Creates the that the Server Socket will bind to

Declaration
public abstract IEndPoint GetBindEndPoint()
Returns
TypeDescription
Mirage.SocketLayer.IEndPoint

CreateClientSocket()

Creates a to be used by on the client

Declaration
public abstract ISocket CreateClientSocket()
Returns
TypeDescription
Mirage.SocketLayer.ISocket

GetConnectEndPoint(String, Nullable<UInt16>)

Creates the that the Client Socket will connect to using the parameter given

Declaration
public abstract IEndPoint GetConnectEndPoint(string address = null, ushort? port = default(ushort? ))
Parameters
TypeNameDescription
System.Stringaddress
System.Nullable<System.UInt16>port
Returns
TypeDescription
Mirage.SocketLayer.IEndPoint