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

Python program , which work as mediator between two Sockets

I want to create a mediator python program, which will receive data from a socket and transfer to other specified socket and vice versa. here is code, but its not functioning. Any Suggestion will be appreciated. import socket import time import…
0
votes
1 answer

Decoding Data Stream From Socket Connection in Java

I have the code below to read from my socket connection. String line = null; try{ BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); while((line = reader.readLine())!=null){ …
hawx
  • 1,501
  • 3
  • 20
  • 34
0
votes
1 answer

Java ServerSocket binding to port Hamachi

So I've been working on a small application that would allow me to create a server, have the server connect/bind to a hamachi network/port, and allow the client to join the hamachi server, then use the client application to communicate and other…
tanishalfelven
  • 1,056
  • 1
  • 9
  • 21
0
votes
1 answer

Why am I getting NullPointerException with ServerSocket in Android

I am having some major problems with my new project. I have a client app on my PC that is sending a simple String of data to the phone over the WiFi LAN connection. When recieved it should be split to its component parts and then an SMS sent. I'll…
tip2tail
  • 365
  • 4
  • 21
0
votes
1 answer

Java - Should I encrypt/decrypt my socket communication?

I have a client/server application where each client has to send an ID and a password before they can actually start the communication. Is that secure enough? Or should I also encrypt and decrypt the byte arrays? Why is the Id and password way…
MinecraftShamrock
  • 3,246
  • 2
  • 17
  • 39
0
votes
0 answers

Iterative UDP multi-service server java

I need to create a multi-service iterative UDP server providing two services: service 1: has a port number 2074 and accepts euro from client and return dollars service 2: has a port number 2075 and accepts dollars from client and return euros I know…
0
votes
1 answer

Java Socket Packet Reading Overlapping

I am tring to read packets on a port which is receiving 4 consecutive packets.When i am tring to read that data using input stream some times data is overlapping.Means sometime next packet is merging with previous packets. Here is the process that i…
Kapil Dave
  • 128
  • 1
  • 6
0
votes
4 answers

How to restart a serverSocket in java

I am trying to add a restart server function that ejects all players and threads, then starts a new server socket for new players. This is how I have tried it, but when I restart, then try to add more players they don't connect? Any help would be…
user3131312
  • 55
  • 1
  • 2
  • 10
0
votes
1 answer

java chat program via internet

well, what i want to do is basically, to make a client server chat program that works over internet, ive done a basic one that works flawlessly over lan, but cant get it right over the internet.. Server : public class Server extends…
0
votes
3 answers

How to use this client-server program?

I have a work code of client-server program. Please explain to me how to successfully use this program. As I understand at first I run Server.java Server.java: public class Server { public static void main(String[] args) throws IOException { …
Jonny
  • 25
  • 4
0
votes
0 answers

Having problems with Java ServerSocket.Accept()

I have been having issues using server socket I have these two methods public boolean sendRequest(String IP, int port) { try { System.out.println("Inside network send"); client = new Socket(IP, port); DataOutputStream…
AerRayes
  • 69
  • 1
  • 12
0
votes
4 answers

ServerSocket not working when Java as Client and Android as server

I want to make my android as Server and Java on PC as client.Is it possible?i tried but some error.I got server code from tutorial. Note:I have connected my computer and phone on same router. Server Code Android: public class Server extends Activity…
0
votes
1 answer

NodeJS Chat Server Broadcast : Pipe vs Write

I'm trying to make a simple chat server for friends/office which will at anytime have a maximum of 50 people connected. A user's message is broadcast to all connected users Server is based on 'net' (TCP/IP) (Will move into 'http' server later…
nitred
  • 4,501
  • 2
  • 19
  • 28
0
votes
1 answer

How do I reply asynchronously to a client using sockets in C#?

I have basically implemented this asynchronous server socket example (and the corresponding client). Using it, I can respond to the client if I follow the example exactly, i.e., if the call to Send() the response is in the ReadCallback() method. If,…
Ed King
  • 1,733
  • 1
  • 14
  • 28
0
votes
2 answers

Server Socket connection Java

I have created a server socket with port 4242 but, It is getting timed out. serversock.accept() takes very long time to execute. Please advice. ServerSocket serversock= new ServerSocket(4242); System.out.println("Waiting " +…
user2968727
1 2 3
99
100