Hello.. I'm working on a program that could be either a client and/or a server at the same time. Well, wanting to work on it.
Going by the ICS examples, I've put together some code that should work. I have a: type TClient = class(TObject) Peer : String; Socket : TWSocket; constructor Create; procedure SocketDataAvailable(Sender: TObject; Error: Word); procedure SocketSessionClosed(Sender: TObject; Error: Word); private buffer : ansistring; public AcceptForm : TForm; Reference : Pointer; PortNum : Integer; peername : TSockAddrIn; end; then in TClient.create I do begin inherited; socket.OnDataAvailable := SocketDataAvailable; socket.OnSessionClosed := SocketSessionClosed; end; Which crashed the program. What's the proper way to do this? Full source to an example program can be found at http://www.mpcode.com/cliserv.zip (its d6 code, but should be fine with anything that runs ICS and Delphi) -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be