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
0 answers

socket server not sending data to php client

I am trying to create a communication between a socket server in java and a php client however apparently no data is sent from server to client. I have tried plenty of methods for writing data to socket but none of those did work although i am able…
user3253067
  • 113
  • 2
  • 11
0
votes
1 answer

Server-Client 2player Game in Java

I am a new one in Java programming i want to know how overall concept of Socket and Server-Client work and how modification in one's system tends to the modification in other's system, As a starter i am making TicTacToe 2 player in java, i had made…
Ajit Singh
  • 390
  • 4
  • 14
0
votes
1 answer

Keep TCP socket-connection alive if no data is currently available

I have implemented a small HTTP-server which allows clients to connect via HTTP and stream audio-data to them. My problem is, that in case there's currently no audio-data available, the connection seems to break, either because the client is…
Martin L.
  • 3,006
  • 6
  • 36
  • 60
0
votes
0 answers

socket_select method in php

could any one help me to understand the following example about handling multiple connection in PHP socket programming. I need just to explain for me these steps if(socket_select($read , $write , $except , null) === false) { …
Mo Haidar
  • 3,748
  • 6
  • 37
  • 76
0
votes
0 answers

why parameters in socket_select method sent by reference?

Hi every body I need your help. could any one explain for me why parameters in the socket_select ( array &$read , array &$write , array &$except , int $tv_sec [, int $tv_usec = 0 ] ) are sent by reference and how the method effect on those…
Mo Haidar
  • 3,748
  • 6
  • 37
  • 76
0
votes
0 answers

shell script taking input from java program and try to execute them

Provide some value from UI as client side, This value should be input of shell script which is on server side. So, I have to develop an interface using java whose take value from UI (Client Side) and send for shell script (On Server) as input and…
Abhijit
  • 1
  • 2
0
votes
0 answers

how to append message in JTextArea saying that a particular user is online or offline in client server

I really dont know if how am I going to display this in my application since I just coudln't figure out if what is the exact code that i will going to use. I'm making a simple chat client server where two or more clients can chat with each other…
user3135677
  • 83
  • 1
  • 9
0
votes
1 answer

JAVA - Sockets :: readline() not doing anything

I created a Network-class where I open a socket an than send requests to it. The class: import java.io.*; import java.net.*; public class Network implements Runnable { private boolean isHost = false; private int hostPort = 19250; …
pubkey
  • 617
  • 8
  • 17
0
votes
0 answers

ServerSocket error EADDRINUSE

I know that this question has already been posted, but every time the answer was that you have to bind the socket after that you have set the option setReuseAddress(true). This is the problem, I have a thread that is always runnning, and in this…
axl coder
  • 739
  • 3
  • 19
0
votes
1 answer

how do I add threads or pools to avoid ConnectException: Connection refused?

The connection is refused because the server hasn't handled the connection as intended. What I would like is for the server to use, perhaps, threads or pools, so that it can handle multiple clients. Should a client disconnect, as happens here,…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
1 answer

When using ServerSockets and Sockets, the BufferedReader hangs and it appears the connection doesn't form properly

EDIT: I have corrected the mistake below in the code, by adding a line into the server code I'm trying to write some socket code that will allow me to send data from one computer to another for a game (which for simplicity's sake, we can think of as…
J_mie6
  • 720
  • 1
  • 9
  • 25
0
votes
1 answer

Detect when a client is no longer listening to server

I am writing an application that streams data that clients can then listen to and receive. However I am running into an issue with closing a socket when a client is no longer listening. What I do is create a ServerSocket, when then waits for a…
Adam Alyyan
  • 420
  • 5
  • 8
0
votes
1 answer

Redirect all the browser request to a local ServerSocket

How can i redirect all the browser request to a local ServerSocket before submiting to internet using java. I was just trying to create a local proxy server. Please help ... Currenty NOT WORKING code BufferedReader reader = null; try { …
0
votes
0 answers

How to get connection with ServerSocket?

I want to develop app that connect to a server and send and receive message. i'm really beginner in that. So,i wrote this code by This tutorial, and it seem that i get some mistake with the port or ip address beacuse i didn't get the message to the…
Matan
  • 296
  • 5
  • 24
0
votes
2 answers

android Handle multiple clients connected to a server using sockets

I have an Android app that needs to let multiple socket communication. here is the basic work around: My application( Say Server) is a service which will run as a sever socket. other application can connect to it on predefined port. There can be a…
morya
  • 835
  • 2
  • 10
  • 19
1 2 3
99
100