• MessageClient



Namespace: Shared.Communication

Assembly: SharedLib

Client object used for receiving messages


#ctor(Int32) Constructor, used for localhost only
#ctor(String,Int32) Constructor, specify server ip address/name and port


TimeOut Set's a flag to indicate time out has occurred
IgnoreBroadcasts Determines whether broadcast messages are ignored or not
IsRunning Returns true if the client is running and connected to the server
ClientID Returns the unique Client ID as identified by the server
Server Returns the server the client is connected to or ("Not Connected")
IsConnected Determines whether the client is connected to the server or not
BufferSize Secifies the buffer size for sending/receiving files files
LoggedIn Indicates whether the client is logged into the server or not


StartListening() Initialises the client and starts listening for messages from the server
StopListening() Disconnects and stops listening for messages
SendMessage(Shared.Communication.Message) Send a message to the server
SendFile(String) Sends a file to the server
ReceiveFile(String) Instructs the server to send a file Server must manage its own path system as only the file name will be sent
HandleClientException(Exception) Handles exceptions when handling client connections
sendMessage(Shared.Communication.Message) Sends the message to the server
RaiseConnected() Raises client connected event
RaiseDisconnected() Raises client disconnected event
RaiseClientIDChanged() Raises client ID changed event
RaiseError(Exception) Raises Internal error event handler
RaiseLoginRequired(String) Raise LoginRequired Event
RaiseLoginFailed() Raises login failed event
RaiseLoggedIn() Raises login success event
RaiseFileReceived(Object, Shared.Communication.TransferFileEventArgs) Raises file received event Used to monitor progres of file being sent/received
RaiseConnectionRefused() Raises connection refused event
RaiseFileReceive(String) Raises a FileReceive event

In This Document