Re: [twsocket] Computer's name
" Your second message comes later and is available from the OnDataAvailable event handler at server side." Is it possible to send this at the same time as it connects? No. The client can only send data when the TCP session is established and your first message is generated at server side form TCP session information. What I need is, to combine both messages and get the ID and computer name. You can combine it when the message comes from the client. I don't see where the problem is. Or maybe there is something I misunderstood. " You should store this per client information in the TTcpSrvClient class (just add new members as you need). As long a the connection is alive, TTcpSrvClient class instance will hold any value you store in it. In all events the "client" argument point to the same instance." I am not sure if understand this but? I have an xml which is kind of database where I would like to keep the computer data and refresh the data everytime I get the "KEEPALIVE" message from the client which will tell me that client is working. Client is sending the keepalive data by informing it's name and from the name I will know who is alive and who is dead. It will be easier for me if I could just combine the messages and insert the data into the xml because I don't know how to store the data in clientclass. In the ICS demos, there are examples. If I remeber well, the demo simply record the datetime of connection. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Computer's name
Hi Francois, Thanks for the response. " Your second message comes later and is available from the OnDataAvailable event handler at server side." Is it possible to send this at the same time as it connects? What I need is, to combine both messages and get the ID and computer name. " You should store this per client information in the TTcpSrvClient class (just add new members as you need). As long a the connection is alive, TTcpSrvClient class instance will hold any value you store in it. In all events the "client" argument point to the same instance." I am not sure if understand this but? I have an xml which is kind of database where I would like to keep the computer data and refresh the data everytime I get the "KEEPALIVE" message from the client which will tell me that client is working. Client is sending the keepalive data by informing it's name and from the name I will know who is alive and who is dead. It will be easier for me if I could just combine the messages and insert the data into the xml because I don't know how to store the data in clientclass. -Original Message- From: Francois PIETTE Sent: Wednesday, May 11, 2011 4:16 PM To: ICS support mailing Subject: Re: [twsocket] Computer's name First, Server gives info of connected client with it's ip and the ID, the ID is very important for me because I need to use it for sending commands to the client. Second, Client sends a message where it tells it's name etc. when it is connected. I push client to send message to the server with lot of info. What I would like to do is, to combine these 2 messages together where I could get the ID and the computer name with all the other info I need from the client. Is it any possible to do this? If I understand correctly, what you name your first message is not really a message, it is just the event triggered at server side when a client is connection to the server. At that time, the client has still not send anything. Your second message comes later and is available from the OnDataAvailable event handler at server side. You should store this per client information in the TTcpSrvClient class (just add new members as you need). As long a the connection is alive, TTcpSrvClient class instance will hold any value you store in it. In all events the "client" argument point to the same instance. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Computer's name
First, Server gives info of connected client with it's ip and the ID, the ID is very important for me because I need to use it for sending commands to the client. Second, Client sends a message where it tells it's name etc. when it is connected. I push client to send message to the server with lot of info. What I would like to do is, to combine these 2 messages together where I could get the ID and the computer name with all the other info I need from the client. Is it any possible to do this? If I understand correctly, what you name your first message is not really a message, it is just the event triggered at server side when a client is connection to the server. At that time, the client has still not send anything. Your second message comes later and is available from the OnDataAvailable event handler at server side. You should store this per client information in the TTcpSrvClient class (just add new members as you need). As long a the connection is alive, TTcpSrvClient class instance will hold any value you store in it. In all events the "client" argument point to the same instance. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Found the cause of the issue for 10053 errors in HTTP
I am 99% sure that there is a problem with HTTPS POST. I have posted code here many times before but unfortunately nobody said anything. Both client and server are ICS. It works fine with HTTP. Regards, SZ On Wed, May 11, 2011 at 13:29, Arno Garrels wrote: > Fastream Technologies wrote: > > Hello, > > > > In some cases SetReady() (hence OnRequestDone) is called twice, where > > the second one should not be called and interferes with following > > HTTP request (if any), ruining the state machine. I suggest something > > like: > > > > void __fastcall SetReady() > > { > > if(alreadySetReady) > > return; > > alreadySetReady = true; > > ... > > } > > > //--- > > Such a fix won't fix the cause of the problem. > Also don't you use a custom OverbyteIcsHttpProt.pas? > > This fix from SVN rev. #623 springs to mind: > > procedure THttpCli.Abort; > var >bFlag : Boolean; >Msg : TMessage; > begin >FLocationFlag := FALSE; { Do not follow relocations V7.10 } >{ The following two lines prevent OnRequestDone from trigger twice V7.10 > } >FRcvdCount:= 0; { Clear the receive buffer V7.10 } >FReceiveLen := 0; { Clear the receive buffer V7.10 } > [..] > > -- > Arno Garrels > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Computer's name
Hi Francois, I am building a server client application for monitoring few pc's which are in different locations(not the same network). The ID what I am having is this one(tag:FClientNo), I get it when the client connects to the server. <--- C O D E > procedure TfrmMain.SslWSocketServerClientConnect(Sender : TObject; Client : TWSocketClient; Error : Word); begin with Client as TTcpSrvClient do begin Inc(FClientNo); // Increment unique client no Tag := FClientNo; // tag connecting client with it's id Display('There is now ' + IntToStr(TWSocketServer(Sender).ClientCount) + ' clients connected.'); Display('Client connected:|' +IntToStr(Tag)+ '|' + ' Remote:' +PeerAddr+ ':' +PeerPort+ '|' + ' Local:' +GetXAddr+ ':' +GetXPort); LineMode:= True; LineEdit:= True; LineLimit := 80; { Do not accept long lines } OnDataAvailable := ClientDataAvailable; OnLineLimitExceeded := ClientLineLimitExceeded; OnBgException := ClientBgException; ConnectTime := Now; //You need to start inserting data into the xml here end; end; <--- C O D E > And this sends the info to the server (the client is sending), here is everything I need from the client and I can get lot more. <--- C O D E > procedure TfrmMain.SslWSocketClientSessionConnected(Sender: TObject; ErrCode: word); var Log: TextFile; begin if Errcode <> 0 then begin memoDisplay.Lines.Add('Can''t connect, error #' + IntToStr(ErrCode)); end else begin SslWSocketClient.SslEnable := True; SslWSocketClient.StartSslHandshake; tlbbtnConnect.Enabled := False; menuFileConnect.Enabled := False; menuFileDisconnect.Enabled := True; memoDisplay.Lines.Add('Connection established succesfully.'); end; SslWSocketClient.SendStr('Computer Name:' + '|' + editComputerName.Text + '|' + 'IP Address:' + '|' + GetIPAddress + '|' + 'Language:' + '|' + GetWindowsLanguage + '|' + 'User name:' + '|' + UserInfo + '|' + 'OS:' + '|' + SO + '|' + 'Date & time:' + '|' + FormatdateTime('dd.mm. hh:nn:ss', Now) + #13#10); stbMain.Panels[1].Text := 'System event lines: ' + IntToStr(memoDisplay.Lines.Count); {Writing events into the log} AssignFile(Log, ExtractFilePath(Forms.Application.ExeName) + 'System\Log\system_log.txt'); Append(Log); {Continue adding events into the log} {Add log events} Writeln(Log,memoDisplay.Text); CloseFile(Log); end; <--- C O D E > -Original Message- From: Francois PIETTE Sent: Wednesday, May 11, 2011 2:28 PM To: ICS support mailing Subject: Re: [twsocket] Computer's name I hope I have explained okay. I do not grasp your complete architecture. Which programs are you writing ? A server, a client, both ? What is the ID you are talking about ? Which protocol are you using ? You own ? -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Computer's name
I hope I have explained okay. I do not grasp your complete architecture. Which programs are you writing ? A server, a client, both ? What is the ID you are talking about ? Which protocol are you using ? You own ? -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Found the cause of the issue for 10053 errors in HTTP
Fastream Technologies wrote: > Hello, > > In some cases SetReady() (hence OnRequestDone) is called twice, where > the second one should not be called and interferes with following > HTTP request (if any), ruining the state machine. I suggest something > like: > > void __fastcall SetReady() > { > if(alreadySetReady) > return; > alreadySetReady = true; > ... > } > //--- Such a fix won't fix the cause of the problem. Also don't you use a custom OverbyteIcsHttpProt.pas? This fix from SVN rev. #623 springs to mind: procedure THttpCli.Abort; var bFlag : Boolean; Msg : TMessage; begin FLocationFlag := FALSE; { Do not follow relocations V7.10 } { The following two lines prevent OnRequestDone from trigger twice V7.10 } FRcvdCount:= 0; { Clear the receive buffer V7.10 } FReceiveLen := 0; { Clear the receive buffer V7.10 } [..] -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Computer's name
Hi Francois, Thanks for the response. I have tested, I can get the computer name if the computer is in the same network. I can send any message including the computer name from the client when it connects. Now, First, Server gives info of connected client with it's ip and the ID, the ID is very important for me because I need to use it for sending commands to the client. Second, Client sends a message where it tells it's name etc. when it is connected. I push client to send message to the server with lot of info. What I would like to do is, to combine these 2 messages together where I could get the ID and the computer name with all the other info I need from the client. Is it any possible to do this? I hope I have explained okay. -Original Message- From: Francois PIETTE Sent: Tuesday, May 10, 2011 7:00 PM To: ICS support mailing Subject: Re: [twsocket] Computer's name We can get some remote info of the connected client from the following code but, are there any possibilities of getting the computername as well? Are you asking about Windows networking "computername" ? This is completly independent of the TCP/IP protocol. It may even be different that the DNS name associated with the computer's IP address. if the remote computer is on the same LAN (or WAn transporting Windows networking), then Windows API has function to enumerate computers on the network (this is what Windows Explorer uses to show the network neightborhood). You may use that API into your application. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Found the cause of the issue for 10053 errors in HTTP
Hello, In some cases SetReady() (hence OnRequestDone) is called twice, where the second one should not be called and interferes with following HTTP request (if any), ruining the state machine. I suggest something like: void __fastcall SetReady() { if(alreadySetReady) return; alreadySetReady = true; ... } //--- To be added to HTTP client component code. Best Regards, SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] ANN: IQ Proxy Server with OpenSSL 1.0.0d available
No unfrotunately this was not true... It is still working under Win7 yet not Win2008. Rather strange! SZ On Wed, May 11, 2011 at 07:51, Fastream Technologies wrote: > One other thing: With the latest ICS/OpenSSL, the HTTPS POST 10053 issue is > also gone away..! :-)) > SubZero > On Tue, May 10, 2011 at 20:32, Arno Garrels wrote: > >> Fastream Technologies wrote: >> >> Does that mean OpenSSL 1.0.0d was not the cause of the AV >> >> but some bug in your code? >> > Yes indeed. The issue was with multi-threaded code, assignment of >> > server instance SslContext was left over... :-o >> >> That's good to know. >> >> -- >> Arno Garrels >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be >> > > > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be