Questions tagged [serversocket]

ServerSocket is a java.net class that provides a system-independent implementation of the server side of a client/server socket connection.

ServerSocket is a java.net class that provides a system-independent implementation of the server side of a client/server socket connection.

A server socket's job is to set up the communication endpoint and passively wait for requests to come in over the network.

Further Reference

Related Tags

1869 questions
0
votes
1 answer

RMI compatibility with ServerSocket in a java server program

Good day stackoverflow. Presently I have a java server program which communicates with the client application through sockets(using the java ServerSocket and Socket classes). But I intend to develop another client application with an interface for…
0
votes
1 answer

Socket.connect() connects but no serverSocket listening

Another road block in my attempt at TCP holepunching. My server is sitting behind a NAT and I am looping a call to socket.connect() to a mobile phone's NAT'd public IP. On my mobile phone I press a button to run a socket.connect() to the server's…
0
votes
1 answer

Firefox sdk addon: Very weird, I can open 2 server sockets on the same address:port

I'm developing a firefox add-on that uses a server socket and I found that I can open server sockets with the same address:port, what is very weird. I have checked with netstat and I was shocked. The behavior of this thing is that the first opened…
Kanowins
  • 1
  • 2
0
votes
1 answer

Sending data multiple times over a single socket in python

I have a python program where I use a server socket to send data. There is a class which has some Threading methods. Each method checks a queue and if the queue is not empty, it sends the data over the sever socket. Queues are being filled with what…
Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
0
votes
1 answer

bind socket fails with errno 88

I was searching for an answer for my issue though nothing relevant came up. I'm writing a very simple code for running a server on a virtual machine (VBOX) running ubuntu 14.04. I turned off my firewall and my anti-virus program (read that it might…
qazwaz
  • 1
  • 2
0
votes
1 answer

Socket Programming Server Socket TimeOut

If my Server Socket has a timeout using setSoTimeOut for some 10 seconds. Is there a way to find the ServerSocket's timeOut Property in my SocketClient ? I have a situation where ServerSocket has some timeout, I need to know in my Client and i have…
0
votes
0 answers

EJb, direct ServerSocket or any other implementation

I am working on a Chatting Website project which will provide similar features as was like yahoo messenger with chat rooms... Where multiple clients will connect to the central server and chatting(communication) and file sharing(if possible) will…
Sharad Ag.
  • 98
  • 5
0
votes
0 answers

java socket inputstream shows unreadable data

String serverName = "192.168.1.18"; int port = 10900; Socket client = new Socket(serverName, port); OutputStream outToServer = client.getOutputStream(); DataOutputStream out = new DataOutputStream(outToServer); String message =…
Waqas
  • 49
  • 4
0
votes
1 answer

java.io OutputStreamWriter.writer blocks when not flushing frequently

I am writing data to socket.writer and what I see is If I don't flush frequently, writer gets blocked and never gets to flush ever. If I flush it for every write, it is just fine. I am not sure how to determine right frequencey of explicit flush …
East2West
  • 657
  • 1
  • 6
  • 22
0
votes
0 answers

How to create a Server using ServerSocket to connect two or more client device via wifi

Am trying to connect (using ServerSocket for server) to android device via wifi. But the problems seems to be the ip of the server. what ip can i use, or is there some other way round. -Code Sample //ServerSide WifiManager wmanager =…
heeleeaz
  • 322
  • 1
  • 3
  • 13
0
votes
1 answer

Getting the ServerSocket to know what data to listen for

I'm working on a simple client / server login system and I'm having trouble getting my server to listen for the right data being sent by the client. On my client I have methods sendRegistrationData() and sendLoginData(), and on my server I have…
FUBAR
  • 89
  • 2
  • 10
0
votes
1 answer

about closing BufferedOutputStream

I'm trying to develop a simple Java file transfer application using TCP. My current server code is as follows: package tcp.ftp; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import…
Kachna
  • 2,921
  • 2
  • 20
  • 34
0
votes
1 answer

How to get number of pending requests or accept requests without blocking in ServerSocket?

I created subclass of java.net.ServerSocket. In run method I want to get all pending requests and send them error message. How to do it with ServerSocket? Here is my code: public class SafeWalkServer extends ServerSocket implements Runnable { …
Volodymyr Levytskyi
  • 407
  • 1
  • 6
  • 15
0
votes
0 answers

How to re-use socket connections?

I have a Client Server Application wherein my client (multiple mobile devices) use HttpsURLConnection to connect to the Server IP/Port. It is a simple application wherein a customer walks-in to the store, makes a transaction on the Teller Mobile…
Shivv
  • 65
  • 2
  • 11
0
votes
0 answers

ServerSocket accept throws nullpointerexception

I am having a problem with a client server app I am working on, for some reason the ServerSocket class accept message is throwing a NullPointerException when a client attempts to connect to it. Here is the class responsible for the server: public…
Armand
  • 9,847
  • 9
  • 42
  • 75