All Questions
16 questions
3
votes
1
answer
127
views
simple multi-threaded TCP chatroom in Java
I'm fairly new at coding and looking to improve. Down below is all of my files for a TCP chatroom with a GUI in java. This is my first networking project so I'm sure it has many problems and does not ...
1
vote
1
answer
1k
views
TCP server in Android to continuously listen to an RFID reader
I have created a TCP server thread which I want to keep running and listening to the IOT device (an RFID reader).
I have only one client.
Please review my code and provide your feedback. Are there ...
3
votes
0
answers
4k
views
Sending ACK/NACK for packets
The code is working perfectly. I'm little bit sure this is a packet what I am sending from client to server in streams. Is this packet? Am I sending in a right way?
Another thing is that I am sending ...
1
vote
1
answer
1k
views
Modbus connection over TCP and Serial port
I want to improve my code. In this code I don't like my constructor, but without it I keep getting an error while trying to connect NullPointerException.
...
4
votes
1
answer
877
views
Java NIO server Selector loop
I have a server that uses Java NIO in non-blocking mode. Right now I'm using a single thread for the selector, and four worker threads to process the bytes after ...
4
votes
1
answer
2k
views
TCP connection pool
I am looking for any feedback on my connection pool implementation (I removed the documentation so this post isn't so bloated). The pool times-out idle connections after a certain timeout interval ...
3
votes
1
answer
23k
views
Reading and Writing Messages from a Socket
This is code from my android client which communicates over wifi to a small server program (not coded in java). This is my first time playing around with sockets, so I'm sure there are lots of little ...
3
votes
2
answers
1k
views
Simple TCP client-server solution
I have implemented a simple client-server solution using Java sockets and useful classes from java.util.concurrent.
The communication protocol is rather simple:
...
6
votes
2
answers
3k
views
Java NIO Server Scaling
I wrote a Java NIO Echo Server and want to maximize the number of connections to the server.
The problem is that when I try to connect more than 10k clients the clients get their connections refused:
...
3
votes
1
answer
2k
views
High-volume object-passing from client to server
I have 1 client and 1 server. Client passes Java objects (throughput 10000/sec). I am using Netty. I am short on CPU and this code consumes a lot.
I have to make Server1 (Netty Client) talk to ...
7
votes
1
answer
3k
views
TCP Server using NIO to save data from IoT clients
I've built a small single threaded TCP server using NIO.
This server is used by small client devices to report things like temperature, when the device has been switched on, when it switches off, and ...
6
votes
1
answer
7k
views
TCP Client-Server communications
I have developed this simple TCP Server/Client communication program, and am looking for ways of lowering the code footprint where possible.Side note, Both Classes are Main as they run independently, ...
9
votes
3
answers
10k
views
TCP Chat (Server/Client)
I'm looking for some hints or advice regarding efficiency, performance and some good coding practices. Also I'm curious about synchronization. The server is multithreaded, so I think some operations ...
9
votes
1
answer
4k
views
Custom TCP Java proxy socket load balancer
I'm working on implementing a custom TCP proxy server which acts like a load balancer. The proxy server will accept client requests and then forward them to available hosts.
I am concerned about the ...
5
votes
3
answers
419
views
Latency problem for keyboard remoting from Android phone - follow up
I'm writing a simple remote PC app (mouse-keyboard). Android is the client and is connected with WiFi to Java PC Server. I'm using TCP but I see a bit of latency compared to other remote apps. I'm ...