apueboy-almailsl106

所属分类:网络编程
开发工具:Delphi
文件大小:8KB
下载次数:6
上传日期:2007-03-20 20:17:05
上 传 者123abc
说明:  局域网消息广播,利用MAILSLOT在局域网发送短信息的程序例子
(LAN news broadcasts, the use of the LAN MAILSLOT send text messages procedures example)

文件列表:
ALMAILSL106 (0, 2002-04-13)
ALMAILSL106\ALMailSlot.dcr (476, 1999-06-07)
ALMAILSL106\ALMailSlot.pas (8835, 2000-09-16)
ALMAILSL106\Example (0, 2002-04-13)
ALMAILSL106\Example\Example.dpr (187, 2000-08-13)
ALMAILSL106\Example\Unit1.dcu (5539, 2001-01-01)
ALMAILSL106\Example\Unit1.dfm (1673, 2000-08-14)
ALMAILSL106\Example\Unit1.pas (1817, 2000-08-14)

局域网消息广播 ALMailSlot v1.06 ---------------- Description: ALMailSlot is a component which allows applications to send messages across a network using mailslots. Published Properties & Events: Active When set to True, the component will send and receive new messages. CheckInterval How often the component will check for and read new messages, in milliseconds. MailBox An 8 character name that specifies the mailbox which the mailslots will be sent through. ThreadPriority The priority of the thread that checks for new messages. OnNewMessage This event gets triggered when a new message is received. The machine sending the messages passes its computer name, user name, and the actual message text. Public Properties & Procedures: Broadcast This procedure will broadcast the given text too all machines. SendMessage This procedure will send the given text to the specified recipient (computer name). Computer This is the name of the local machine. (Read Only) UserName This is the name of the user currently logged in. (Read Only) Some notes about mailslots and the component: Unfortunately, under Windows 95/*** you can only send a maximum of approx. 400 bytes through a mailslot. If you want to send more than 400 bytes, you'll have to split the message up into multiple messages. Mailslots will send out messages using all the protocols setup on the machine that will support message sending. This is why sometimes you receive two (or more) messages. The only way to get around this problem is to include some sort of indicator in your message, like a counter or the time sent. So, for example, you could send out '1Hello', then when the receiving machine gets the message it will strip the 1 from the start and display the 'Hello'. When it receives the same message again, it will check to see if it has a '1', if it does, ignore it because this message has already been received. The mailbox name cannot be greater than 8 characters in length if you are using Windows 95. Windows *** and NT will allow for a mailbox name of 255 characters. This is why I have limited the components mailbox name to 8 characters. Andrew Leigh (leigh@alphalink.com.au) http://www.alphalink.com.au/~leigh/components

近期下载者

相关文件


收藏者