Re: [twsocket] TWSocket.Dup() ?
Hello Michael, You dont need to replicate it. Just leave the Socket where it is. In your second form you can have a socket that points to the other socket. Dont drop one on the second form, but just (I called the socket Cli): SecondForm.Cli := MainForm.Cli; and then you call all in the Cli of the second form witch points to the Cli of the mail form. An object variable is just a pointer to the actual object, so you can as many pointers to the same object as you wants. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Saturday, January 7, 2006, 00:58, Michael Preslar wrote: I have my main form which has a TWSocket.. All is well. Now, I'd like to add another form (visibility can be toggled on or off .. and in truth, its just a little chat window).. I'm thinking that I need to replicate the TWSocket from the main form onto the chat form, so my charform.sendbutton.onclick() can chatform.socket.sendstr(inputbox.text); Is this the right way to go? If so, whats the better way to make this work? -- 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
Re: [twsocket] DNSQuery BUG...
Hello Ann, still doesn't start OnRequestDone event... Could be that it is waiting... To have a short timeout you can eventually set your own timeout timer. Please start next time a new subject instead of reply to another one and change the subject line. You do that every time and your message will not be seen by many people. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, January 6, 2006, 20:44, Ja wrote: Ok. I've managed to make my project to check the list of domains for hosts but i've noticed that there is something wrong with DNSQuery component. With some nameservers (like those of my provider) DNSQuery sometimes doesnt get any answer... and although firewall (and netstat) after some time takes connection as closed, DNSQuery still doesn't start OnRequestDone event... -- 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
Re: [twsocket] DNSQuery BUG...
Please start next time a new subject instead of reply to another one and change the subject line. You do that every time and your message will not be seen by many people. Oh... sorry. Didn't know that it matters. -- 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
Re: [twsocket] FtpServer - When to send a file?
Yeah. Simple stuff. And it took me half a day to figure it out. Doh! The is just some experience gain :-) -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Michael Preslar [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, January 07, 2006 12:55 AM Subject: Re: [twsocket] FtpServer - When to send a file? Ya know. It'd help if I actually paid attention to ftpsrv.pas .. Took a bit of reading, but gained a (limited) understanding of the component. In the end, I answered my own question: The server handles it all by itself. Just make sure that: 1) FtpClient1.HostDirName and FtpClient1.HostFileName are correct 2) Either A) FtpServer1.DelayedSend := false _OR_ B) FtpClient1.Timeout is relatively high 3) Don't throw in the thread stuff if you're not going to use it. Yeah. Simple stuff. And it took me half a day to figure it out. Doh! Michael Preslar wrote: I'm having trouble figuring out where to put the Send file bit of an ftpserv component, and once that part is figured out, the best way to send the file data. -- 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 -- 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
[twsocket] HTTP client and NTLM
A user reported having problem with a server handling badly NTLM. Using the option httpoNoNTLMAuth doesn't really disable NTLM. The user has derived a new class from the component and has added in the constructor FServerAuth = httpAuthBasic; Then it works. If someone could confirm this behaviour... -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- 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
Re: [twsocket] DNSQuery BUG...
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 7 Jan 2006 21:23:06 +0100 Temat: Re: [twsocket] DNSQuery BUG... Ok. I've managed to make my project to check the list of domains for hosts but i've noticed that there is something wrong with DNSQuery component. With some nameservers (like those of my provider) DNSQuery sometimes doesnt get any answer... and although firewall (and netstat) after some time takes connection as closed, DNSQuery still doesn't start OnRequestDone event... That's perfectly normal since it use UDP protocol which is an unreliable protocol by definition. UDP packets are simply dropped when congestion occur on the network. No attempt is done to confirm nor retry anything. But I've set protocol to TCP... -- 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
Re: [twsocket] TWSocket.Dup() ?
What I ended up doing (Which I'll spit out here just in case anyone else ever runs into the same situation .. Or maybe theres a better way): First define 2 variables.. chatform.socket : pointer; chatform.connected : boolean; Then set the chatform variables mainform.ConnectToServerClick() if not assigned(chatform.socket) then chatform.socket := @WSocket1; mainform.WSocket1.OnSessionConnected() chatform.connected := true; mainform.WSocket1.OnSessionClosed() chatform.connected := false; Then, finally, in the chatform, when the user does something and needs to send data.. if assigned(socket) and connected then TWSocket(socket).sendstr(s); Haven't stress tested it or anything yet, but it works well in my testing so far. Wilfried Mestdagh wrote: Hello Michael, You dont need to replicate it. Just leave the Socket where it is. In your second form you can have a socket that points to the other socket. Dont drop one on the second form, but just (I called the socket Cli): SecondForm.Cli := MainForm.Cli; and then you call all in the Cli of the second form witch points to the Cli of the mail form. An object variable is just a pointer to the actual object, so you can as many pointers to the same object as you wants. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz ... Is this the right way to go? If so, whats the better way to make this work? -- 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
Re: [twsocket] HTTP client and NTLM
Scrive Francois PIETTE [EMAIL PROTECTED]: A user reported having problem with a server handling badly NTLM. Using the option httpoNoNTLMAuth doesn't really disable NTLM. The user has derived a new class from the component and has added in the constructor FServerAuth = httpAuthBasic; Then it works. If someone could confirm this behaviour... I just discovered that when Arno changed FServerAuth and FProxyAuth from string to an ordinal type some code was modified in the wrong way. In the PrepareNTLMAuth function the original code was: if (httpoNoNTLMAuth in FOptions) and (((FStatusCode = 401) and (CompareText(FServerAuth, 'NTLM') 0)) or ((FStatusCode = 407) and (CompareText(FProxyAuth, 'NTLM') 0))) then and replaced by: if (httpoNoNTLMAuth in FOptions) and (((FStatusCode = 401) and (FServerAuth = httpAuthNtlm)) or ((FStatusCode = 407) and (FProxyAuth = httpAuthNtlm))) then As you can see this is wrong. Is must be: if (httpoNoNTLMAuth in FOptions) and (((FStatusCode = 401) and (FServerAuth httpAuthNtlm)) or ((FStatusCode = 407) and (FProxyAuth httpAuthNtlm))) then Similar situation in the PrepareBasicAuth function. Actually it is: if (httpoNoBasicAuth in FOptions) and (((FStatusCode = 401) and (FServerAuth = httpAuthBasic)) or ((FStatusCode = 407) and (FProxyAuth = httpAuthBasic))) then but it must be: if (httpoNoBasicAuth in FOptions) and (((FStatusCode = 401) and (FServerAuth httpAuthBasic)) or ((FStatusCode = 407) and (FProxyAuth httpAuthBasic))) then Another error in the DoRequestAsync procedure. Actually it is: if (FCtrlSocket.State = wsConnected) and (FHostName= FCurrentHost) and (FPort= FCurrentPort) and (FProtocol= FCurrentProtocol) then begin {$IFDEF UseNTLMAuthentication} if FProxyAuth httpAuthNtlm then begin instead the last line must be: if FProxyAuth = httpAuthNtlm then begin Tell me if with these fix the problem disappear. Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- 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
[twsocket] Bug in HttpContCod.pas
Hello, I just discovered a small bug in the HttpContCod unit. in the THttpContentCoding.GetCoding the line Result := Copy(ClassName, Length(BASE_CLASS_NAME), MAXINT) must be Result := Copy(ClassName, Length(BASE_CLASS_NAME) + 1, MAXINT) Actually this bug is harmless, so no need to hurry to prepare a new release :-) Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- 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