serversocket Questions

4

Solved

At the server side, we use Socket server = serverSocket.accept(); to create a socket. After the socket is created, we can create a new thread to handle the input/output stream of that socket. S...
M16 asked 18/7, 2013 at 17:37

5

Solved

As far as I know I can create a server using both TCPListener and Socket, so what is the difference between the two of them? Socket private Socket MainSock; MainSock = new Socket(AddressFamily.In...
Dipterous asked 11/9, 2012 at 2:31

22

Solved

In Eclipse, I got this error: run: [java] Error creating the server socket. [java] Oct 04, 2012 5:31:38 PM cascadas.ace.AceFactory bootstrap [java] SEVERE: Failed to create world : java.net.Bin...
Sunfish asked 4/10, 2012 at 23:7

3

Solved

I wrote a socket program to send a file and receive a string from socket In which I specified the client(wrote the ip address of client) I want to get that client address dynamically, I tried .getp...
Embolic asked 7/2, 2019 at 6:27

0

I'm building a website, where my client communicates with the server over web sockets. I'm using Nodejs on the backend and hence, the famous socket.io library for web sockets communication. The Pro...
Rabat asked 28/1, 2021 at 9:13

3

I'm building some internal tooling for myself to generate Flutter apps using some templates that I've setup along with some additional functionality that I can share between apps. At the moment t...
Topcoat asked 12/3, 2019 at 11:0

6

Solved

I am trying to develop an Android (server) app that will accept TCP connections directly from the Internet. I tried this a couple of years ago with no joy. Is this even possible? I asked this que...
Reflexion asked 14/9, 2019 at 18:21

1

Can someone tell me or give a ready-made CRUD example using WebFlux, RScoket and Spring (or SpringBoot)? I studied the RSocket documentation, WebFlux, also wrote my simple examples, but I would li...
Fairfield asked 25/2, 2020 at 15:41

1

I want to see logs of my project Steps : I clone a socket app. Then I run npm install pm2 -g to install pm2 I run pm2 start It works. It display a table of my socket app But if I run pm2 logs...
Bergh asked 17/9, 2019 at 13:58

1

Solved

What is the most reliable pattern to follow when closing an OutputStream, ServerSocket, or other object that implements the AutoCloseable interface? Should I use try-catch-finally? Or a shutdown h...
Rimarimas asked 13/5, 2019 at 12:41

2

Solved

I need to implement a heartbeat system on my Java project (3-5 Clients with 1 server for them) but I have some questions. 1) Do I need to have 2 sockets by clients ? 1 for the heartbeat and 1 to r...
Fikes asked 23/11, 2015 at 10:44

8

Solved

My new laptop (Alienware m17x) throws a java.net.SocketException: Invalid argument: connect when I run the following basic code: Server.java: public static void main (String[] args) throws Exceptio...
Gleeson asked 21/11, 2011 at 18:34

2

I am basically trying to host a server on an Android Device. Client devices connect to the server over TCP and send requests. The server performs the action requested by the client and then writes ...
Dak asked 27/7, 2018 at 19:0

3

I am trying to connect to a secure websocket created by PHP, but for some reason it doesn't work. The certificate files are readable for PHP. This is my code so far (PHP side; stripped down code f...
Culmination asked 11/5, 2018 at 8:45

3

Solved

I am using Java.net at one of my project. and I wrote a App Server that gets inputStream from a client. But some times my (buffered)InputStream can not get all of OutputStream that client sent to m...

4

I have searched a lot for this exception, which rarelly occur, but I didn't find any relevant answer which can solve my problem, I am using HttpURLConnection to get response as a xml from a url, it...
Grassland asked 11/5, 2013 at 4:25

4

Solved

I was running a few tests with sockets, and I encountered some strange behavior: A ServerSocket will refuse connections after the 50th client Socket connects to it, even if that client socket is cl...
Dodge asked 19/10, 2012 at 20:26

9

If Socket represents client side and ServerSocket represents server side, why Socket.read reads the data from server side? I'm really confused, Can you please clarify it to me?
Sanyu asked 5/1, 2010 at 6:30

2

Here, I am developing a project with java sockets and I have a problem with the implementation of the correct time synchronization between Server and Client. I am going to describe the problem with...
Schnabel asked 27/6, 2015 at 6:43

1

As per ServerSocket(int port, int backlog), backlog indicates maximum length of the queue. I created a simple server socket, with backlog as 1 using following code ServerSocket serverSocket = new ...
Bunk asked 24/12, 2016 at 1:10

1

I am having a problem Running a network service when my app connects to a WiFi network. I am getting a the following exception, java.net.SocketException: socket failed: ENONET (Machine is not on ...
Melliemelliferous asked 7/11, 2016 at 10:28

5

i try to write simplest possible server app in Java, displaying html form with textarea input, which after submitting gives me possibility to parse xml typed in that textarea. For now i build simpl...
Bleb asked 13/6, 2010 at 20:19

2

Solved

I've got a bit of an issue and I've been asking regarding it quite a few times, but I think I'm one step closer now, so hopefully someone can help me with the rest. My previous questions: Connec...
Upstroke asked 30/1, 2012 at 0:32

1

Solved

ServerSocket serverSocket = new ServerSocket(some_port); Socket socket = serverSocket.accept(); serverSocket.close(); Will socket be closed as well?
Fatigued asked 3/4, 2016 at 0:38

2

Solved

I have implemented a customer interface using java (multithreaded). On the client side customer logs in when the server is already running. Multiple clients can login creating a thread for each cli...
Quod asked 13/2, 2016 at 0:37

© 2022 - 2025 — McMap. All rights reserved.