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

1801 questions
0
votes
1 answer

Server Side Socket c# network error

I am very new to programming c# in visual studio. I am trying to send a message from an android app (Client side) to a windows app (Server side) using sockets. I don't know if I should be able to do it in the wireless network that I have, or is that…
0
votes
1 answer

How to share a socket single connection between two clients?

I want to know how to share a socket single connection between two clients. I have programmed in the following way, and need advise for the rest of the development. Socket (Java desktop program) | | …
Stella
  • 1,657
  • 3
  • 34
  • 83
0
votes
0 answers

Socket from Android Emulator to Virtual Machine network

I am running my android emulator on my machine. I have a virtual machine running that is on a host-only network with. The address of the interface is 192.168.56.1 and my VM is 192.168.56.2, I want to make a socket connection from my emulator to a…
sideshowbob
  • 204
  • 6
  • 22
0
votes
2 answers

Java.lang.NullPointerException Error in the code

I am getting an error which says as Java Null Point Exception. I tried debugging and saw that the error is persisting only. I think there is a problem with the printwriter or the client object. Is it any initialization error ? I have even closed…
0
votes
3 answers

HashMap data not appending new data into ArrayList

I am using the following code to connect with java socket from an Applet client. I store Client's IP Address and some random number in every NEW connection happening in addNewClient() function in the below code. I store this info in HashMap. I add…
Stella
  • 1,657
  • 3
  • 34
  • 83
0
votes
3 answers

Java TCP Client Server Hangs Up?

I am currently having difficulty understanding why my code is not working. I've included my client and server code below. I've figured out that my problem happens somewhere in the while loops but I'm not sure how to fix it so that it doesn't get…
Amateur Math Guy
  • 199
  • 1
  • 3
  • 12
0
votes
1 answer

Server socket reading its output before client input. Socket reading/writing ordering?

I have a client-server model set up using one socket with two way communication. It supposed to go like this: 1. Client - send array of words 2. Server - read array of words 3. Server - send boolean 4. Client - read boolean 5. Client - send…
0
votes
2 answers

InputStream reading bytes gets struck at while loop

I am having a socket listener program running(eclipse) on a mac machine and iOS client app is sending image to it in Bytes format. Normally, Image bytes will be 40 K and above. I am facing a strange issue while reading the image bytes in socket. I…
Stella
  • 1,657
  • 3
  • 34
  • 83
0
votes
1 answer

Unable to read all bytes using InputStream read API?

I am having problem reading image bytes in java socket. My iOS client is sending an image here, and it needs to read the total bytes and store that as image on the server end. It works very fine, when i tested through iOS simulator. Because, If I…
Stella
  • 1,657
  • 3
  • 34
  • 83
0
votes
3 answers

basic4android Server Socket

I'm trying to do a two ways communication between a PC running .NET Client-Server and an Android device, (the code is made with Basic4Android). Sending from Android to PC works fine, the problem occours when i try to send from the PC to Android. I'm…
user2959923
  • 115
  • 1
  • 2
  • 10
0
votes
1 answer

Can i Make my Devices Listen through Same port

I am new to android and I want to create a WiFi based chat engine using socket programming. I was able to retrieve the list of devices connected to WiFi using this project, now I want to create a server socket on my app to listen for connections on…
user2822233
0
votes
1 answer

ServerSocket.accept() throwing SocketTimeoutException with null message

I am trying to get an instance of Socket from ServerSocket Object. But, it always prints SocketTimeoutException = null There is my code: try { // We listen for new connections Log.d("ShairPort", "Service >> In TRY "); try { …
Kanak Sony
  • 1,645
  • 1
  • 20
  • 35
0
votes
2 answers

How do i stop my server in java

How do i stop a server cause the ss.close() doesn't stop the server. I am using the following code : public class Server { ServerSocket ss; boolean listening; public void StartServer() { try { …
Kobus
  • 25
  • 1
  • 5
0
votes
1 answer

Socket reset by peer without reseting myself

For some reason every time I try to write a Object to a Socket and it errors with the following error: java.net.SocketException: Connection reset by peer: socket write error Full stack trace at end. Here is my client code: note:…
user3045798
  • 163
  • 3
  • 10
0
votes
1 answer

Client Server Programming

Here the code executes the required output perfectly It checks for the condition and prints the error if the condition is not true , but it also prints even if the condition is true and followed but the required output. finding problem in a small…
game go
  • 25
  • 5
1 2 3
99
100