I am doing a server and client socket datagram. The client connects to the server and you need to write in the client a string that contains Hello or hello. When the server detects a string with hello or Hello, repplies to the client with another string. The problem is that the client doesn’t read the string that the server
Tag: sockets
Why do both Java and Go lock socket before write?
The Go internal/poll/fd_unix.go code is here the java code java.net.SocketOutputStream#socketWrite is here I don’t know why we need to lock that. Another question is the syscall.Write equivalent to <unistd.h> write in C? Answer Well, only answering for the Java part: As we are already talking about implementation details, why stop at the Java level? The C Source code for OpenJdk
Java Server Socket Socket program stuck while reading
i have 2 programm one is a server and the other the client , i have some other class who represent geomtric shape. In the client with the scanner the user write the caracteristics of the shape width,length for a rectangle as an example. the he create an object and send it to the server , the server receive the
Send a 2D Matrix from Client to Server in Java using TCP connection (Socket Programming)
I need to send a 2D matrix from the client to the server-side using the following packages: I have read a matrix from the user and I need to send to the server to perform certain operations on it. How do I send the complete matrix across? I am sending multiple variables and not just a matrix. I am sending
Send Object Over Java Socket
I have a class name player (It is for creating a new player) I also have a client class: And im using objectOutputStream but it says that it “java.io.NotSerializableException: objects.Player” And I want to send my player to the server but it says that exception! Also if you need here is the server class and also if you want here
Socket.close stuck for 15 minutes
I’ve developed my own MMORPG game client and server using SSLSockets. New connections get a dataoutput/input stream in their own threads. In my main thread loop, I have a method that goes through the connection map and closes connections (inactivity kicks, requested logouts, etc.). My game server randomly hangs for 15 minutes so every 60 seconds, in another thread, I
File corrupted while sending through socket
I am just trying to send some files from a socket and i am able to send those files without any interruption: also whether the size file is small or large that does not matter it sends like a charm. But the problem in my case that is arising is the file that i sent is being corrupted, i.e. it
ISP or Windows firewall blocking UDP connection
I have made a online player game in which i use TCP connection between server and client, and UDP (DatagramSocket) between clients (its a real time game). My problem is that i can play with some friends but no with others, that is to say, my UDP connection works only with some PCs. I think the only possible reason for
What is the best way to update the ip adress of serversocket for clients?
I’m programming a little server example with Sockets in Java. Currently I’m using this for testing: but my plan is to move it to my Raspberry Pi. Unfortunately, I don’t have a static IP address. What is the proper way to update the IP address in the code? I thought about storing it on a webserver and accessing it via
Do we need to add interface Runnable in our UML class diagram? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question I have created a simple FlappyBird clone game with socket programming and now I am doing the UML diagram. My classes