FakeSocket
A class in Root.Township, Alta.Networking.
A do-nothing socket for running without a network. Sends report success and go nowhere; most other calls log an error.
- Listed in Networking and servers
- Inherits or implements
ISocket,IDisposable
Constructors
| Member | What it is |
|---|---|
FakeSocket() | Creates a FakeSocket with default values. |
Properties
| Member | What it is |
|---|---|
int ConnectionCount { get; } | Always 0. |
IEnumerable<Connection> Connections { get; } | Always empty. |
ConnectionChannel DefaultChannel { get; set; } | Default channel; unused. |
static FakeSocket Instance { get; } | The single fake socket. |
bool IsServer { get; } | Always true. |
int OutgoingQueueSize { get; set; } | Unused. |
ITransportSocket TransportSocket { get; } | Always null. |
Events
| Member | What it is |
|---|---|
event ConnectionEventHandler ConnectionCreated | Never raised. |
event ConnectionEventHandler ConnectionDestroyed | Never raised. |
event Action<ISocket> SocketDestroyed | Never raised. |
Methods
| Member | What it is |
|---|---|
Connection CreateConnection(string ipAddress, int port) | Logs an error and returns null. |
Connection CreateConnection(ITransportConnection transportConnection, string ipAddress) | Logs an error and returns null. |
void DestroyConnection(Connection connection, bool isFlushing = false) | Logs an error. |
void Dispose() | Does nothing. |
Connection GetConnection(int identifier) | Logs an error and returns null. |
bool SendToAll(ConnectionChannel channel, MessageType type, SerializeConnectionMethod method) | Does nothing and returns true. |
bool SendToPlayers(ConnectionChannel channel, MessageType type, SerializeConnectionMethod method, IEnumerable<IPlayer> players) | Does nothing and returns true. |
void UpdateReceive() | Logs an error. |
void UpdateRecieve() | Misspelled extra method. Logs an error. |
void UpdateSend() | Logs an error. |