<< Maybe a typo error ?>> No, all that code was copied-and-pasted from TCPSrv1.pas.>>
--The 10048 problem seemed to stem from some redundant code: procedure TfClientMain.FormShow(Sender: TObject); begin ApplicationEvents.OnException := ApplicationEventsException; if WSocketServer.Addr <> '0.0.0.0' then begin WSocketServer.Addr := '0.0.0.0'; { Use any interface } WSocketServer.Listen; { Start listening for client } end; PostMessage(Handle, WM_APPSTARTUP, 0, 0); end; procedure TfClientMain.WMAppStartup(var Msg: TMessage); begin WSocketServer.Proto := 'tcp'; { Use TCP protocol } WSocketServer.Port := '1234'; { Use telnet port -- changed to 1234 } WSocketServer.Addr := '0.0.0.0'; { Use any interface } WSocketServer.ClientClass := TTcpSrvClient; { Use our component } WSocketServer.Listen; { Start listening } end; Once I commented out much of the above code, the 10048 error went away (Addr and Port are assigned in the .DFM): procedure TfClientMain.FormShow(Sender: TObject); begin ApplicationEvents.OnException := ApplicationEventsException; // if WSocketServer.Addr <> '0.0.0.0' then begin // WSocketServer.Addr := '0.0.0.0'; { Use any interface } // WSocketServer.Listen; { Start listening for client } // end; PostMessage(Handle, WM_APPSTARTUP, 0, 0); end; procedure TfClientMain.WMAppStartup(var Msg: TMessage); begin //WSocketServer.Proto := 'tcp'; { Use TCP protocol } //WSocketServer.Port := '1234'; { Use telnet port -- changed to 1234 } //WSocketServer.Addr := '0.0.0.0'; { Use any interface } WSocketServer.ClientClass := TTcpSrvClient; { Use our component } WSocketServer.Listen; { Start listening } end;
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer.
-- 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