C# Класс Descent.Messaging.Connection.ServerConnection

A TCP server connection.
Наследование: Connection
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
AcceptProcedure bool
ClientConnected bool
MessageReceived void

Открытые методы

Метод Описание
Close ( ) : void
SendString ( string message ) : void

Sends a string through the server. Will send to all clients except the sender of the message.

ServerConnection ( int port ) : System
Start ( ) : void

Start the server. Will listen on port for new clients.

Приватные методы

Метод Описание
AcceptProcedure ( ClientInfo newClient ) : bool

Decides if a new client can join the server.

ClientConnected ( ClientInfo newClient ) : bool

Called when a client has connected.

MessageReceived ( ClientInfo fromClient, string message ) : void

Called when a message was received.

Описание методов

Close() публичный Метод

public Close ( ) : void
Результат void

SendString() публичный Метод

Sends a string through the server. Will send to all clients except the sender of the message.
public SendString ( string message ) : void
message string The string to send.
Результат void

ServerConnection() публичный Метод

public ServerConnection ( int port ) : System
port int
Результат System

Start() публичный Метод

Start the server. Will listen on port for new clients.
public Start ( ) : void
Результат void