473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

PowerTCP SSL Socket

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
Nov 14 '05 #1
5 2224
Paola <ri*****************@tiscali.it> scribbled the following:
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?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"To err is human. To really louse things up takes a computer."
- Anon
Nov 14 '05 #2
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in message news:<bv**********@oravannahka.helsinki.fi>...
Paola <ri*****************@tiscali.it> scribbled the following:
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?


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+copiatiHead er,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
Nov 14 '05 #3
Paola wrote:
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in message
news:<bv**********@oravannahka.helsinki.fi>...

What was your C question?
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.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #4
Richard Heathfield <do******@address.co.uk.invalid> scribbled the following:
Paola wrote:
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in message
news:<bv**********@oravannahka.helsinki.fi>...
What was your C question?
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.


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.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I am lying."
- Anon
Nov 14 '05 #5
Joona I Palaste wrote:
.... 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.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chuck E. Cheese | last post by:
I need a php page to connect to a python created socket and sent and receive data. below is the python code which opens a socket on the localhost @ port 21567: #!/usr/bin/python2 from socket...
8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
3
by: Thomas Hervé | last post by:
My problem is not really python specific but as I do my implementation in python I hope someone here can help me. I have two programs that talk through a socket. Here is the code : <server>...
4
by: DreJoh | last post by:
I've read many articles on the subject and the majority of them give the same solution that's in article 821625 on the MSDN website. I'm using the following code and when a the client disconnects...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
0
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
4
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.