Skip to content
Advertisement

Tag: sockets

send and recieve Socket Datagram

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

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

Advertisement