473,566 Members | 3,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there way to enfore HTTPServletResp onse to close the socket

Hi

I want HTTPServletResp onse to *close* the socket after sending the
response. For this I'm closing the OutputStream after writing the
data. But still socket is not closed and client keeps on waiting to
read data from socket.

And surprisingly this happens only if I use multipart/related in
Content-Type in the response.

Is there way to enfore HTTPServletResp onse to close the server socket?

Also, is there any relation between setConentLength header of
HTTPServletResp onse and whether the server will "keep-alive" the
socket connection?
thanks,
Naresh
Jul 17 '05 #1
0 2993

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

Similar topics

0
1306
by: F.G.Testa | last post by:
Hi folks! How to receive a notification when a async_client is closed? class AcmePopupChannel(asynchat.async_chat): .... def handle_close(self): print 'Closed channel' def handle_error(self): print 'Error in channel'
1
9475
by: KaXo | last post by:
$r_socket = IO::Socket::INET->new( PeerAddr => "10.0.26.78", PeerPort => 17990, Proto => 'tcp', Timeout => 1 ); ...................... if ($r_socket && $r_socket->connected()) { close($r_socket); }
0
1412
by: Vitamin | last post by:
Hi All Professior, I am using JAVA to write a program that will open a socket and print something to server side. then I have close the socket in the JAVA already If I just running the .class file in command mode, it can be close the socket but if I using set objJAVA = getObjcet("java:classFile") in ASP
1
3778
by: Daniel | last post by:
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" what am i doing wrong? is there some thing else i need to do to free up the socket after i send data into it? I simply want to open socket, send data, close socket and have the server just handle one client thread to recieve...
2
10791
by: L.J.SONG | last post by:
I use following code to create socket and connect to a server app: /// code ///// Socket connecter = null; IPEndPoint localEp = null; IPEndPoint remoteEp = null; IPHostEntry he = Dns.Resolve("localhost"); IPAddress localAddr = he.AddressList; localEp = new IPEndPoint(localAddr,11000);
10
4013
by: Uma - Chellasoft | last post by:
Hai, I am new to VB.Net programming, directly doing socket programming. In C, I will be able to map the message arrived in a socket directly to a structure. Is this possible in VB.Net. Can anyone please help me with some sample codings and guidance? Can you also suggest some other news group available for socket programming in VB.Net?
9
5517
by: zxo102 | last post by:
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame. But the "app.MainLoop()" in wxpython looks like conflicting with the "while 1:" in socket server. After I commented the "app.MainLoop()",...
4
16065
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 the socket again, the bind fails because the port is still in use. When I execute the code in "debug" mode, the problem never occurs. When I...
1
2626
by: Frank Rizzo | last post by:
When you close a socket (.e.g. .Shutdown, .Dispose, etc...), the socket goes into TIME_WAIT mode for about 4 minutes, then gets killed by the OS. However, during this time, the socket is not available. Is there a way to close a socket, so that it actually closes and is immediately available to be used by another application (or the same...
0
7673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.