[twsocket] Update the browse

2005-08-14 Thread Gleison Gibellato da Silva
I just started to use ICS components and they appear very simple to use and 
powerfull, the sample help a lot for me
that have a small knowlegment in HTTP protocol.

I built a HTTP server using the ISC HTTPSever component and I have a 
question, I need update the browse by the server side without the browse 
send a request to me

Is it possible?

If yes how can I do this?


Thank you

Gleison Gibellato da Silva 
-- 
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] Update the browse

2005-08-14 Thread Francois PIETTE
 I built a HTTP server using the ISC HTTPSever component and I have a
 question, I need update the browse by the server side without the browse
 send a request to me

 Is it possible?
 If yes how can I do this?

Technically, it is possible except the HTTP protocol has no provison for 
doing that. Usially, it is done using differents ways:
1) The browser request a periodic refresh because he received a HTML 
document containing the line:
   META HTTP-EQUIV=Refresh CONTENT=2;URL=mydocument.html
The number 2 above is the number of seconds the browse wait before 
requesting the given URL.

2) The server reply to some normal request with a never ending document. You 
either omit Conten-Length or use a huge value. Most browser analyse received 
document on the fly and display as it comes in.

3) Use a Java Applet or ActiveX object that establish a secondary connection 
to your server and do whatever they like with that connection.

--
[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


[twsocket] Twsocketserver

2005-08-14 Thread Igor Pokorny
Hi guys,

I do have a realtime application communicates to one side by USB and to 
the other acts as http server and/or TCPserver. I am trying to use ICS 
http server and everything seems OK. I use another free component of TCP 
server that has to run in different thread because of not event driven. 
  Synchronizing makes me a lot of problems so I decided to use TCP 
server from ICS. My TCP communication isn't line oriented. Could I find 
any documentation to Twsocketserver or some example how to handle binary 
and maybe fragmented packets?  I am already late with my project so I 
would prefer quick, maybe dirty help :-(

Thanks in advance

Igor
-- 
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] HttpCli content encoding

2005-08-14 Thread Maurizio Lotauro
On 13-Aug-05 08:46:47 Francois PIETTE wrote:

Thank Francois for your answer. I hope other people will partecipate
to this discussion.

a) Isn't it possible to defer call to THttpContentCoding.GetCoding until it
is really needed so that exceptions are raise at that time ?

I made some changes, now the GetCoding is called only when it is
needed.

b.1) There is already a property Options which is a set of properties. It
is better to extent this set.

First, I mention record but I mean object.
Usually I don't use anymore a set for a property mainly for two
reasons. The first is that set are limited in the number of members.
The second, and more important for me, is that sets doesn't works
well with VFI, because you cannot switch a member without affecting
the others.
But last word is yours.

b.2) No opinion now.

I decided that disabling mean that the whole things is not handled by
the component (like today).

c) Acceptable. Maybe add an event with a boolean var argument ignore. If
ignore is true, nothing special happend, the document is receive
undecompressed. If ignore = false then an exception is raised. Just an idea.

I'm not convinced. We should think about a real scenario. I think
that it is better for the moment that it remain as is, and then make
a change when/if it is real needed to handle a real situation.
Opinion from others reader?

d) I do not master the topic. Could you elaborate ?

I know only what I red from RFC. This is what I understood.
You can specify in the header what kind of encoding you can handle.
This doesn't mean that you cannot receive a body encoded with a
method not included in the Accept-Encoding.
A second form is to specify the econding with a quality parameter,
for example gzip:1 deflate:0.9. With this you inform the server
that you can handle both gzip and deflate but you prefer gzip.
If you specify 0 as quality then it mean that you don't accept the
encoding.
Two particular encoding are identity and *. You will never see
this in the answer, only in the Accept-Encoding header. The first
mean no encoding and the second all others.
So if you write gzip:1 identity:0.2 *:0 should mean I prefer gzip
over identity, but doesn't accept any other encoding.
Even this should be possible: gzip:1 identity:0 *:0 i.e. send me
only encoded with gzip.

This is the theory. Practically I made some test with IIS 5.1 and it
seems ignore completly the quality.

Actually I made some changes to disable the quality by default and
use 0 as default quality for indentity and *. Coding with quality = 0
will not specified in Accept-Encoding if quality is not used.


Bye, Maurizio.

-- 
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] Twsocketserver

2005-08-14 Thread brian
You could use a custom small header on every packet you send, i.e. first 2-4 
bytes being the packet size, so when you receive data you add to a buffer 
and check if it reached the total size of the packet. If it has not, do 
nothing, if it has, complete the buffer and send the data packet to a 
processing routine. If the last data amount received exceeds the packet 
lenght you specified in the header, you can cut it and move it into a new 
clean buffer. I have some sources for that if you need

- Original Message - 
From: Igor Pokorny [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Monday, August 15, 2005 00:50
Subject: [twsocket] Twsocketserver


 Hi guys,

 I do have a realtime application communicates to one side by USB and to
 the other acts as http server and/or TCPserver. I am trying to use ICS
 http server and everything seems OK. I use another free component of TCP
 server that has to run in different thread because of not event driven.
  Synchronizing makes me a lot of problems so I decided to use TCP
 server from ICS. My TCP communication isn't line oriented. Could I find
 any documentation to Twsocketserver or some example how to handle binary
 and maybe fragmented packets?  I am already late with my project so I
 would prefer quick, maybe dirty help :-(

 Thanks in advance

 Igor
 -- 
 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