There is nothing to understand in the buffering. The buffer is automatic and
only limited by available virtual memory. You get an exception when you run
out of memory, just like you have - for example - when you run out of memory
trying to add strings to a TStringList or anything else. That is
Thank you for the code. I have solved the problem. It was caused by other
modules which are not thread safe. The bug ate up HttpSvr's memory space.
Best regards,
Kyin
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of éric Fleming Bonilha
Sent: Sunday,
Hello Clay,
Maybe a typo error ?
No, all that code was copied-and-pasted from TCPSrv1.pas.
Maybe you cast the wrong object ?
In a TWSocketSErver event, the Sender argument is TWSocketServer, the
Client argument is your clientclass. In the events of the datasockets
the Sender argument is your
I don't know of ANY component where it is safe to call the message pump
from
one of its event without knowing what happend. Even for a simple
TButton.OnClick, you can get strange result if you call the message pump
within the OnClick handler because the handler is re-entered. The
problem
You know, modern hard drives actually checksum written data so you never
get corrupted data back. You might get NO data back (that is, an I/O
error) but that would make any operation on the file fail, including
burning the file to a CD. I've read this in a howto for Linux'es
software raid
It is actually for data integrity as well (more than security, in my
opinion.) When it comes to large file download, there might be corrupted
bytes. Then this is more likely caused by HD errors then network errors.
Conclusion: I think data corruption might be a problem in some cases.
Notice
I want to add:
1) ISAPI must have sync sockets
2) when I go through breakpoints, no -1's are returned and the sample
jpg returned by the ISAPI extension works perfectly. (no corruption)
Best Regards,
SZ
On 11/21/06, Fastream Technologies [EMAIL PROTECTED] wrote:
Hello,
In our ISAPI server,
Clay Shannon wrote:
ESocketException - Error 10048 in function Bind Address already in
use.
Another socket is already listening on the same IP and port.
---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
--
To unsubscribe or change your settings for TWSocket
What could be the reason? Any idea?
Cal WSAGetLastError to know the error code.
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
- Original Message -
From: Fastream Technologies [EMAIL
Alternatively, you may send your data in text form instead of binary
form.
It takes more space but you have no problem with line end terminator (The
default CRLF is perfect) and you avoid problem with binary representation of
data which DIFFER from one processor to another processor.
So
Oh, never mind, I see it in your other answer now (I'm reading answers
posted over the weekend and this mailing list (live) simultaneously),
namely:
MyOpCode := PInteger(@Buffer)^;
Thanks, Francois!
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Clay
- Original Message -
From: Cosmin Prund [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Monday, November 20, 2006 10:16 AM
Subject: Re: [twsocket] What might cause ICS to fail and we need to be aware
of?
Francois Piette wrote:
I don't know of ANY component where
If I add this line of code (from TcpSrv1.pas):
PostMessage(Handle, WM_APPSTARTUP, 0, 0);
To the FormShow() event, I get this error msg:
ESocketException - Error 10048 in function Bind Address already in use.
On the last line (Listen) of this code:
procedure TfClientMain.WMAppStartup(var
See TTcpSrvForm.WSocketServer1ClientConnect in TcpSrv1.pas source.
When I try to use that code, I get an EInvalidCast error, specifically,
EInvalidCast - Invalid class typecast on this line:
with Client as TTcpSrvClient do begin
of the OnClientConnect() event handler.
TWSocketServer
I have a TWSocketServer which is listening incoming clients connections.
Once a client is connected, the server send data to it.
Sometimes, I need this client to send command to the server.
Is it possible with ics components ?
If yes, how can I do it ?
When the client is connected to the
Hello everyone.
I'm using THttpServer to send a document myself (using hgWillSendMySelf)
so I can keep sending new data without requiring a new connection. It
works just fine. Now I want to do the same the other way around: I want
to use THttpCli to continually post data, without closing the
Francois Piette wrote:
I don't know of ANY component where it is safe to call the message pump from
one of its event without knowing what happend. Even for a simple
TButton.OnClick, you can get strange result if you call the message pump
within the OnClick handler because the handler is
Thanks
- Original Message -
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Monday, November 20, 2006 8:04 PM
Subject: Re: [twsocket] How server can send data to clients ?
it's ok for the server part ?
is it the same method for the client
There is no IMAP component in ICS. Sorry.
Maybe you'll write it ?
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
-
OnDataAvailable() should only fire once for each record, because I am
having
the sender add a #126 (~) as the last byte of each record, and using
LineMode with LineEnd = #126.
WARNING: Since your record contains binary data, it could contains a #126 as
part of the data. So the line mode
it's ok for the server part ?
is it the same method for the client part (to send data to server) ?
No matter which side you are talking about. It is the same class -
TWSocket - which handle the connection at both ends. So the methods,
properties and events are the same.
--
Contribute to the
Hi,
I have a TWSocketServer which is listening incoming clients connections.
Once a client is connected, the server send data to it.
Sometimes, I need this client to send command to the server.
Is it possible with ics components ?
If yes, how can I do it ?
TIA,
Engi
--
To unsubscribe or change
Hello,
In our ISAPI server, if the request is detected to be of a ISAPI
interpreter one, we run the routine,
OldDataAvailable = FOnDataAvailable;
OldSendData = FOnSendData;
OldDataSent = FOnDataSent;
FOnDataAvailable = NULL;
FOnSendData = NULL;
FOnDataSent = NULL;
int iMode = 0;
Francois Piette wrote:
Because it would need to create a try/finally frame which would have an
impact on the performance given the high rate the events may be triggered
when speaking about network I/O. And it is very easy for the component user
to use a flag to detect reentrancy in his own
I can't see a component for Imap in the ICS-package.
I have never used IMAP and don't know much about this protocol, but now have
a customer that needs support for this. Does anyone in this list have any
tip for IMAP-components that works well with ICS?
Regards Bjørnar
--
To unsubscribe or
it's ok for the server part ?
is it the same method for the client part (to send data to server) ?
- Original Message -
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Monday, November 20, 2006 6:56 PM
Subject: Re: [twsocket] How server can
When I send a string from my test utility, the ClientConnect() event(*)
fires in my app, which is listening for messages, but the
ClientDataAvailable() event(**) is not fired.
And when I send the message a second time from the test utility, I get
Connect: socket already in use.
Also, the
Alternatively, you may send your data in text form instead of binary
form.
It takes more space but you have no problem with line end terminator (The
default CRLF is perfect) and you avoid problem with binary representation
of
data which DIFFER from one processor to another processor.
So
See TTcpSrvForm.WSocketServer1ClientConnect in TcpSrv1.pas source.
When I try to use that code, I get an EInvalidCast error, specifically,
EInvalidCast - Invalid class typecast on this line:
with Client as TTcpSrvClient do begin
of the OnClientConnect() event handler.
And this even though
I noticed something.
If in the OnDocData event handler of THttpCli I somehow re-enter the
message pump (that is, do something that calls
Application.HandleMessage or Application.ProcessMessages) the downloaded
file is corrupted! It took me a while to find this out and now I'm asking:
(1)
If I add this line of code (from TcpSrv1.pas):
PostMessage(Handle, WM_APPSTARTUP, 0, 0);
To the FormShow() event, I get this error msg:
ESocketException - Error 10048 in function Bind Address already in use.
Error 10048 occurs when you try to make a socket listening on a port alreay
used
Right. But since you send integer data type, you WILL have #126 in the
binary data !
In the infamous words of Kip Dynamite, Dang it
Is there any LineEnd value I can set that will be safe to assume it won't
get sent in integer data?
Defenitely none !
Or will I need to pull out the
Francois PIETTE wrote:
IMO, you have all the required tools !
Yes, no question, you realy have all the required tools. But you
also have the required tools to write a SMTP client using TWSocket,
and nevertheless there's a SMTP client in ICS. What I mean is that
it won't hurt to put that in,
Here is an idea: (HTTP uses this logic). Send a header with the
content-length first then cut the data wrt that.
Regards,
SZ
On 11/20/06, Francois PIETTE [EMAIL PROTECTED] wrote:
Alternatively, you may send your data in text form instead of binary
form.
It takes more space but you have
Which TWSocketServer event should I code to retrieve incoming data?
I'm sending data from a test util (using TWSocket), and have SHowMessage()
code in the following events:
WSocketServerClientConnect()
WSocketServerDataAvailable()
WSocketServerDataSent()
WSocketServerSendData()
I don't understand what you real app is. It is your server
application?
Yes. I'm trying to send it the data from a test util (in actuality, the data
will come from a real-time system).
Is it built using TWSocketServer ?
Not right now.
Don't use TWSocket for listening, use TWSocketServer which
Can somebody point me to documentation that gives an overview of what
TICSLogger does and how to use it? Is there a demo that features it?
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
I'm using THttpServer to send a document myself (using hgWillSendMySelf)
so I can keep sending new data without requiring a new connection. It
works just fine. Now I want to do the same the other way around: I want
to use THttpCli to continually post data, without closing the
connection.
You
I do not think the issue understood the same here and there. Why is
the Count = -1 then?
When you call Send, passing a number of bytes and send is not able to send
it without blocking and non-blocking mode is active, then send returns -1 to
tell you it can't do what you asked. Nothing is sent.
Hello Francois,
Thanks for the pointer. The error is 10035.
Best Regards,
SZ
On 11/21/06, Francois Piette [EMAIL PROTECTED] wrote:
What could be the reason? Any idea?
Cal WSAGetLastError to know the error code.
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Which TWSocketServer event should I code to retrieve incoming data?
Define a private procedure like this :
procedure ClientDataAvailable(Sender: TObject; Error: Word);
In the OnClientConnect event, you have to assign an event handler to
your client socket.
Something like this :
I do not think the issue understood the same here and there. Why is
the Count = -1 then? What should one do to have the sync method work?
(I have changed the mode to sync, I hope you noticed. See the code I
posted in my __first__ email.)
Regards,
SZ
On 11/21/06, Francois PIETTE [EMAIL
Using hgWillSendMySelf I noticed the proxy server immediately connects
the client to the server and the connection is kept open as long as I'm
sending data. If the proxy server does the same for the long HTTP post
it would provide a very valuable tool for what I need.
I wouldn't base my
Francois Piette wrote:
I'm using THttpServer to send a document myself (using hgWillSendMySelf)
so I can keep sending new data without requiring a new connection. It
works just fine. Now I want to do the same the other way around: I want
to use THttpCli to continually post data, without
Hello Clay,
OK, by going over the clidemo and TCPServ projects (which successfully
communicate with each other) with a fine-toothed comb, and setting all my
design-time and run-time properties, etc., as in those demos, I was able to
get it to work.
Good :)
---
Rgds, Wilfried [TeamICS]
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'
OK, by going over the clidemo and TCPServ projects (which successfully
communicate with each other) with a fine-toothed comb, and setting all my
design-time and run-time properties, etc., as in those demos, I was able to
get it to work.
Bravo! Salud! Hallelujah! Etc.
-Original Message-
Thanks for the pointer. The error is 10035.
As you can see in the docs, it is WSAEWOULDBLOCK. This not a real error in a
non-blocking environment. It just mean the winsock call would block to
execute the task and non-blocking mode has been selected.
--
Contribute to the SSL Effort. Visit
Hi,
How can I used a PC without network cable connected (WinXP), to
do broadcast with UDP. i.e.
Create 1 Send socket with
Send.Addr= '255.255.255.255'
Send.LocalAddr = '127.0.0.1'
Send.ReuseAddr = true
And few Listen socket
Listen.Addr = '0.0.0.0'
Listen.LocalAddr
Hi,
I need a client function that connects to server, send data and close
connection.
My code is :
bool __fastcall TfrmMain::SendCde(int PortIP, AnsiString Cde)
{
bool Result;
int Sent;
WSocket-LineMode = true;
WSocket-LineEnd = \r\n;
WSocket-Proto = tcp;
WSocket-Port = PortIP;
A little error in my code.
I repost it
- Original Message -
From: Engi [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Wednesday, November 22, 2006 8:24 AM
Subject: [twsocket] Connect, send and close
bool __fastcall TfrmMain::SendCde(int PortIP, AnsiString Cde)
{
51 matches
Mail list logo