473,385 Members | 1,772 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,385 software developers and data experts.

SSL Socket and Power TCP

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 i
the client ask a pdf file or a zip file the response is "Object ar
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 bi
(e.g. original format 22 kb byte received 23 kb) the result of this i
that zip and pdf reader doesn't know format file
the code that I wrote is

//Connection with web serve
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 serve

//Start receiving the answer from web serve

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); // Only used to see what I receive. To browser I send Ricevuta: the right byte sequence that I received from web server

where

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

Anyone can help me

Nov 15 '05 #1
0 958

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

Similar topics

3
by: James Yang | last post by:
Hi, I am using Sockets to connect to a remote computer and send data using Socket.Send() and receive using Socket.Receive() (block mode) . for somereason tho, when the client disconnects the...
1
by: Graham | last post by:
Can anyone tell me how to detect when a client socket connection has failed (ie remote equipment power failure) using VB.net. Thanks in advance
3
by: Poiquiop | last post by:
Hi. I was wondering if there were any good tutorials related to socket programming, and handling different protocols, etc. Thanks, J.L.
6
by: roger beniot | last post by:
I have a program that launches multiple threads with a ThreadStart method like the following (using System.Net.Sockets.Socket for UDP packet transfers to a server): ThreadStart pseudo code: ...
6
by: Luis P. Mendes | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've developed a program that uses a socket to receive information 24h a ~ day. The problem is that the socket seems to freeze. By that I...
0
by: Marco | last post by:
Hi, I can use sd.setsockopt() to enable the socket use TCP keepalive feature, but how to set a different parameters(interval, probes and time) for it? Sure, I can modify...
3
by: Anand | last post by:
Dear All, I have to create one application software using VC++ for Windows socket. I have to use UDP protocol here. What can I do? If any body could guide us I would be pleased to them. ...
3
by: EricKit | last post by:
I'm trying to use socket.send() to send real time images from a camera as fast as possible from a single board computer. I am going over a wireless connection over a mile with almost 1W output power...
0
by: Chris Rebert | last post by:
On Mon, Nov 17, 2008 at 10:42 AM, Abah Joseph <joefazee@gmail.comwrote: Have you considered basing this off existing software for schools, like one of the programs listed on...
1
by: s3raph | last post by:
Hi, I'm having trouble detecting the client machine connection lost when the client physically pushes the power or restart button on their computer. Using the code from Plater in the following...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.