Menu

#1 connection code

open
nobody
None
5
2002-11-14
2002-11-14
No

Here's a suggestion:
separate the connection / processing, with some kind of
interface.
The processing component would have an interface
property like

property Connection: IVNCConnection read ... write ...;

where
IVNCConnection = interface
[GUID]
procedure SendPacket(const APacket: TVNCPacket);
procedure RegisterPacketReceiver(const ARecv:
TVNCPacketReceiver);
procedure UnRegisterPacketReceiver(const ARecv:
TVNCPacketReceiver);
end;

and of course TVNCPacket is a suitable type (maybe a
packed record with a case field)

and TVNCPacketReceiver is the base type for the vnc
component or something. Could be different, whatever.

But this way would allow hooking up connection objects
at designtime on the form, written with different other
component suites etc, all they need is to implement
that given interface.

johannes

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.