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

Listen to two ports simultaneously in java

I am working on a chat application using java. One of the functionality that I want to implement is that beside client1 chat with client 2(which works fine), client1 will send secondary information (data from an Arduino) to client2. The idea that I…
achref
  • 1,150
  • 1
  • 12
  • 28
0
votes
0 answers

asynch socket listener receiving data very late for some clients

I am making a server socket in c# with async method. Here is the code I am using.... http://msdn.microsoft.com/en-us/library/fx6588te%28v=vs.110%29.aspx Currently there are more than 200 clients connected at a time (can be more than 1000 at a time).…
0
votes
2 answers

How to handle an input duplicate name error using swing in a multi-threaded chat

I create a client-server chat without graphical interface. And it works in console. now I want to create swing interface. But I get stuck trying to handle error duplicate name. When Server accepts connection, it creates new thread for this…
Nikolas
  • 2,322
  • 9
  • 33
  • 55
0
votes
0 answers

Streaming mp4 videos from serversocket on AIR

I am trying to build a mini-webserver on an iPad inside an Adobe AIR application. I am using the ServerSocket class to set up the webserver as shown by example at…
Fréderic Cox
  • 321
  • 2
  • 7
  • 22
0
votes
1 answer

SSL Connection between IPhone App and Java ServerSocket

I'm trying to establish a SSL Connection between an IPhone App and an Java SSLServerSocket. My Java Server looks like that: SSLServerSocketFactory ssf = null; try { // set up key manager to do server authentication SSLContext…
user2071938
  • 2,055
  • 6
  • 28
  • 60
0
votes
1 answer

First string from Client get's sent and shown by the Server. After that, the server doesn't get it?

So I decided to try and create a simple chat room type of program. I've got most of the things working, when I send a message, it outputs on the server.. Except I can only send one message, after that nothing happens on the server.? i.e: input on…
GAds
  • 3
  • 1
0
votes
1 answer

Detect closed socket

I'm writing a multithreaded server which at the moment just receives a string and send it back capitalized. My problem is that the server doesn't detect when the connection to the client is lost and the client Handler thread is therefore kept…
Cyberlurk
  • 766
  • 3
  • 9
  • 30
0
votes
1 answer

Android ServerSocket Port Selection

I'm trying to figure out how the Android OS assigns ports via the ServerSocket constructor. (Link: http://developer.android.com/reference/java/net/ServerSocket.html) Specifically, using the 2nd constructor, the documentation claims that "If port ==…
Siege898
  • 463
  • 4
  • 10
0
votes
0 answers

Java Socket for multiplayergame server can't read data from a player

for an exam i have to make a synchronous multiplayergame, to practice with the serverside, i decided to make a little sketch in processing where two clients exchange the mouse's positions. The idea is when two client are connected to the server, the…
Jaeger
  • 331
  • 1
  • 2
  • 11
0
votes
2 answers

Server and Client wont talk to each other

I am trying to make some sort of login system, but the server and client wont talk to each other. I am not quite sure why they wont talk to each other, but any help is appreciated. P.S The port is correctly set up on my router. Client public class…
0
votes
2 answers

Java responses to browser

This code should be able to respond to client browser. This is my code for listening to browser: public class simpleServer extends Thread { static ServerSocket serverSocket; public static void main(String[] args) throws IOException { …
user3808021
0
votes
1 answer

Java Server to Android Client: Cannot receive TCP packets

I'm trying to write a Java server so that an Android client can send a string to it, and the server would reply with its own string. The first part of this works, where the client sends a string to the server, but the server sending a message to the…
putty174
  • 305
  • 5
  • 19
0
votes
1 answer

Data corrupted from iOS to Socket

I am sending a 3 dimensional array data from my iOS project to a socket server java code. I send in bytes format. Socket is receiving the data at this line, while ((read = input.read(bufferr)) > 0) { String s = new String(bufferr); } But the…
Stella
  • 1,728
  • 5
  • 41
  • 95
0
votes
1 answer

Stopping socketserver.ThreadingMixIn in python

I'm extending socketserver.ThreadingMixIn in Python 3.4 to build my own threaded server while keeping the original callbacks overwintered only for logging porpoises. The activation and creation is very simple and according to python documentation…
Eli
  • 75
  • 7
0
votes
2 answers

Message passing in Server Socket in Java

I am new in Socket programming of java, i had written two files in Java named Server.java and Client.java as below: Server.java import java.io.*; import java.net.*; public class Server { static ServerSocket server = null; static Socket socket =…
Ajit Singh
  • 390
  • 4
  • 14
1 2 3
99
100