Questions tagged [socketexception]

SocketException is the superclass of all other socket related exceptions and may be thrown during socket creation or setting options.

SocketException is the superclass of all other socket related exceptions and may be thrown during socket creation or setting options.

616 questions
0
votes
2 answers

Connection Reset in Java

I've been trying to fix this error for days now. Really. I just don't get it. The code is simple enough.. Why is it not working? public class server { public static void main(String[] args) { String fileName = null; try { …
Asim
  • 6,962
  • 8
  • 38
  • 61
-1
votes
2 answers

Connection reset while streaming xml

My code needs to download a big xml file (500MB) inside a GZIPInputStream and process it doing some operations for every object. Those operations take time to be completed, and I have many objects to process. I'm using commons http-client 3.1 and…
javanna
  • 59,145
  • 14
  • 144
  • 125
-1
votes
1 answer

What is causing connection reset in my tcp server?

This error can happen at anytime but the error message is not showing where it happens during runtime, Error message TCPServerhandler with the closing part TCPServerHandler TCPserverRun code TCPServer
user13830582
-1
votes
1 answer

Socket is closing immediately upon being created

I'm creating a NetUtils class which extends thread to handle socket communications in a GUI without blocking the main thread. My code looks like the following (assume all import are accounted for): Main method public static void main(String[] args)…
Mike
  • 175
  • 1
  • 13
-1
votes
1 answer

Socket throw exception only after 1 minutes

i recently develop an app that can use java socket to connect to java server socket in PC. This code work perfectly when connect to the server it send String immediately after the thread had been called but i dont know why when i close the server…
-1
votes
1 answer

Catch SocketTimeOutException In cxf Jaxrsclient

I am making a rest call using apache cxf . I am able to set timeout during invoking a service and corresponding socketConnection timeout exception gets thrown but i am not able to catch the exception and set it as user definied exception. Please…
-1
votes
1 answer

java SocketException: Software caused connection abort: recv failed

This is quite a simple Java client/server application. Here I try to synchronize the accesses to the ArrayList. However, an exception is thrown. And I think I have protected everything I should. Can anyone help explain what's wrong with this code?…
HuangJie
  • 1,488
  • 1
  • 16
  • 33
-1
votes
1 answer

Server SocketException Error in Android

I have a server-client code which I modified for 2 way communication after I downloaded from internet. I am stuck with server data reception error. When client makes connection, the server replies by sending "Connected to CLIENTIPADDRESS" to client.…
-1
votes
1 answer

Connection reset in sockets

I have a game like blackjack that I have a server and players. When I execute the server and the players in the same computer it works perfect. But when I execute the players in one pc and the server in another pc it works so rare. After some…
user2911701
  • 69
  • 1
  • 10
-1
votes
1 answer

how to deal with socketexcrption connection lost

I get socketexception that tell "connection reset" in the server side. this happen when Client side lost the connection to the server and re- connect. what may I do to "fix" the socket. how to handle this Exception after it occur ... EDIT my…
EsmaeelQash
  • 488
  • 2
  • 6
  • 20
-1
votes
2 answers

SocketTimeoutException while readFully

I have below code which throws SocketTimeoutException. Socket socket = new Socket(localhost, 9978); socket.setSoTimeout(10000); OutputStream oStream= socket.getOutputStream(); byte[] data = new byte[] {'h', 'e', 'l', 'l',…
Arjun Patel
  • 345
  • 6
  • 22
-1
votes
1 answer

Can Socket still be used after Timeout?

Is it possible to continue using a .NET Socket after synchronous Send/Receive method throws a SocketException because of exceeding the specified Send/Receive Timeout? Here it is said that methods will throw exception immediately after the first…
Alp
  • 553
  • 11
  • 30
-1
votes
1 answer

SocketException in Java: Transferring files through TCP/IP

I am attempting to transfer a file from one computer to another using TCP/IP. I have written the code in java as shown below. However, the code does not work and after using multiple catch blocks I found out that this was caused due to a…
-2
votes
2 answers

TCP Server in C#

Iam just a beginner student socket programming.I tried a simple code from "TCP/IP Sockets in C# Practical Guide for Programmers" pdf book but it doesn't work.I compiled it in visual studio 2010.Please help me what is wrong and here is the complete…
-3
votes
1 answer

SocketException while closing application

I'm making a twitch bot which gets requests via chat and loads a youtube player via JWebBrowser from the requested link, but when i close the application i get a socket exception (Unless i remove the component used to display the JWebBrowser…
1 2 3
41
42