IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
PipeServer.Server Class Reference

Classes

class  Client
 

Public Member Functions

static SafeFileHandle CreateNamedPipe (String pipeName, uint dwOpenMode, uint dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr lpSecurityAttributes)
 
static int ConnectNamedPipe (SafeFileHandle hNamedPipe, IntPtr lpOverlapped)
 
delegate void MessageReceivedHandler (Client client, string message)
 
 Server ()
 
void Start ()
 Starts the pipe server More...
 
void SendMessage (string message)
 Sends a message to all connected clients More...
 

Public Attributes

const uint DUPLEX = (0x00000003)
 
const uint FILE_FLAG_OVERLAPPED = (0x40000000)
 
const int BUFFER_SIZE = 4096
 

Properties

string PipeName [get, set]
 
bool Running [get]
 

Events

MessageReceivedHandler MessageReceived
 

Private Member Functions

void ListenForClients ()
 Listens for client connections More...
 
void Read (object clientObj)
 Reads incoming data from connected clients More...
 

Private Attributes

string pipeName
 
Thread listenThread
 
bool running
 
List< Clientclients
 

Constructor & Destructor Documentation

PipeServer.Server.Server ( )
inline

Member Function Documentation

static SafeFileHandle PipeServer.Server.CreateNamedPipe ( String  pipeName,
uint  dwOpenMode,
uint  dwPipeMode,
uint  nMaxInstances,
uint  nOutBufferSize,
uint  nInBufferSize,
uint  nDefaultTimeOut,
IntPtr  lpSecurityAttributes 
)
static int PipeServer.Server.ConnectNamedPipe ( SafeFileHandle  hNamedPipe,
IntPtr  lpOverlapped 
)
delegate void PipeServer.Server.MessageReceivedHandler ( Client  client,
string  message 
)
void PipeServer.Server.Start ( )
inline

Starts the pipe server

References PipeServer.Server.ListenForClients().

Referenced by PipeServer.Form1.btnStart_Click().

void PipeServer.Server.ListenForClients ( )
inlineprivate
void PipeServer.Server.Read ( object  clientObj)
inlineprivate
void PipeServer.Server.SendMessage ( string  message)
inline

Sends a message to all connected clients

Parameters
messagethe message to send

References client(), and PipeServer.Server.Client.stream.

Referenced by PipeServer.Form1.btnSend_Click().

Member Data Documentation

const uint PipeServer.Server.DUPLEX = (0x00000003)
const uint PipeServer.Server.FILE_FLAG_OVERLAPPED = (0x40000000)
const int PipeServer.Server.BUFFER_SIZE = 4096

Referenced by PipeServer.Server.Read().

string PipeServer.Server.pipeName
private
Thread PipeServer.Server.listenThread
private
bool PipeServer.Server.running
private
List<Client> PipeServer.Server.clients
private

Property Documentation

string PipeServer.Server.PipeName
getset
bool PipeServer.Server.Running
get

Event Documentation

MessageReceivedHandler PipeServer.Server.MessageReceived

The documentation for this class was generated from the following file: