hi i was looking through SocketSpy source code under "User Made" section of
ICS website and when i tested program i was curious about something. If i
would like to send data (packets) to both the remote connection and local
connection how would i do so?
A TWSocketServer component exist on the form but it spawns the client
declared separately in the unit. When i tried to remove the RemoteSocket
declaration from
type
TClient = class(TWSocketClient)
private
Rcvd: string;
Color: TColor;
public
RemoteSocket: TWsocket;
Destructor Destroy; override;
end;
and make it a global variable when sending local and remote data at the same
time i was not able to do so, only 1 at a time.What i'm asking is, how can I
send data (e.g) under a button click event instead of having to send data
only in the OnClientDataAvailable event etc.. I need to use both server and
client sockets at literally the same time, one line under the other using
SendStr(). I tried something like this but Remote connection took priority
over local in sending.
for i:=0 to wSocketServer.ClientCount-1 do wSocketServer.Client
[i].SendStr(data);
if (Assigned(RemoteSocket)) and (RemoteSocket <> nil) then
RemoteSocket.SendStr(data2);
Any help would be greatly appreciated.
--ICSNewbie05
--
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