PowerTCP SSL Socket

P

Paola

Hi,
I have a very strange problem with PowerTCP:
I made a wrapper between a server web and the browsers.
If the client ask Html pages or images there is no problem instead if
the client ask a pdf file or a zip file the response is "Object are
closed in the middle of the SSL handshake" and I receive half file.
Instead if I use another kind of procedure I receive a file too big
(e.g. original format 22 kb byte received 23 kb) the result of this is
that zip and pdf reader doesn't know format file.
Anyone can help me?

thanks

PAola
 
J

Joona I Palaste

Paola said:
Hi,
I have a very strange problem with PowerTCP:
I made a wrapper between a server web and the browsers.
If the client ask Html pages or images there is no problem instead if
the client ask a pdf file or a zip file the response is "Object are
closed in the middle of the SSL handshake" and I receive half file.
Instead if I use another kind of procedure I receive a file too big
(e.g. original format 22 kb byte received 23 kb) the result of this is
that zip and pdf reader doesn't know format file.
Anyone can help me?

What was your C question?
 
P

Paola

Joona I Palaste said:
What was your C question?

Excuse me,
the code that I wrote is:

//Connection with web server
ssSocket = new Dart.PowerTCP.SslSockets.Tcp();

SslStream secureStream = new SslStream(new TcpStream(ssSocket ));
secureStream.useAuthentication = false;
ssSocket .Stream = new SegmentedStream(secureStream);
int ax=nv+1;

ssSocket.Connect(Host,Port);

ssSocket.Send(richiesta); //Send the Browser request to web server

//Start receiving the answer from web server

Ricevuta=new Byte[start+copiatiHeader];

Array.Copy(Header,0,Ricevuta,0,copiatiHeader);
copiatiBody=0;
count=start;
//I receive until received byte (copiatiBody) = content length
while (copiatiBody<start)
{
byte[] temp= new Byte[1024];
int appenaricevuti= ssTelemaco.Stream.Read(temp,0,1024);
Array.Copy(temp,0,Ricevuta,copiatiBody+copiatiHeader,appenaricevuti);
copiatiBody+=appenaricevuti;
pag = ASCIIEncoding.ASCII.GetString(Ricevuta);

}


where

start=byte received from web server
copiatiHeader=header length
Ricevuta=Byte array that contain the page received from web server.


When I asked the question to Dart (PowerTCP producer) their answer was
that the code is right so to you what could be the problem?
The application wrate in C# if this is the wrong group exuse me.

Paola
 
R

Richard Heathfield

Paola said:
Excuse me,
the code that I wrote is:

//Connection with web server
ssSocket = new Dart.PowerTCP.SslSockets.Tcp();

That is not C.
The application wrate in C# if this is the wrong group exuse me.

This newsgroup discusses C. For Microsoft-specific languages, try asking in
a Microsoft forum.
 
J

Joona I Palaste

That is not C.
This newsgroup discusses C. For Microsoft-specific languages, try asking in
a Microsoft forum.

C# is as much related to C as Java is. Both are descendant languages of
C that inherently support object orientation. Neither is the same
language as C, and neither is the same language as the other. We don't
get any Java questions at all here on comp.lang.c. We get the occasional
C# question. Why?
The only sensible reason is: "C#" begins with C. "Java" doesn't.
Microsoft must snigger every time they read these messages, thinking
that their ploy is working just fine. *I* think they should have given
their new language a real new name, like "Squirglepleex" or something
equally obvious and apparent.
 
C

CBFalconer

Joona said:
.... snip ...

C# is as much related to C as Java is. Both are descendant languages of
C that inherently support object orientation. Neither is the same
language as C, and neither is the same language as the other. We don't
get any Java questions at all here on comp.lang.c. We get the occasional
C# question. Why?
The only sensible reason is: "C#" begins with C. "Java" doesn't.
Microsoft must snigger every time they read these messages, thinking
that their ploy is working just fine. *I* think they should have given
their new language a real new name, like "Squirglepleex" or something
equally obvious and apparent.

My suggestion: "UnholyCashCow". The compiler is named UCC,
pronounced ugh. The executable modules are of type .uck. No
standards need apply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,138
Messages
2,570,805
Members
47,349
Latest member
jojonoy597

Latest Threads

Top