All Questions
1,422 questions
0
votes
0
answers
29
views
Problem with client and server operation on ZeroMQ pattern ROUTER-DEALER
I want to make a connection between the client and the server in my C++ application in Linux.
On the client, I use a DEALER socket.
On the server, I use proxies and workers to asynchronously process ...
0
votes
0
answers
57
views
UNIX socket data exchange between client and server. Due to the message length, it stops
I'm trying to set up a UNIX socket communication for exchanging floats between a client and a server.
The following tutorial did help a lot and I realized a very simple client python code which sends ...
0
votes
2
answers
85
views
How to wait until multiprocessing.connection.Client is available in python?
I have a process.py script:
from multiprocessing.connection import Listener
with Listener(('localhost', 6000)) as listener:
with listener.accept() as connection:
message = connection.recv(...
0
votes
0
answers
29
views
why the code stop and i cant input any thing after selecting the sub-choice?
so the issue is that after i select the sub-choice, it only says enter category for example to search but i cant write any thing there.
**here is the server code:
**
import socket
print("THE ...
0
votes
0
answers
43
views
Java socket TCP
I have to make a project of a multiplayer words game using TCP / sockets and swing GUI. I made the server class with threads (to handle multiple clients) and implemented runnable and I made the client ...
0
votes
1
answer
97
views
Why is this Kotlin Socket connection taking so long? What can I do to optimize it?
I am new to Socket programming and Kotlin. This code does respond but it takes about 8-10 minutes, but the same code in Python takes about 5 seconds.
Where am I wrong, and what can I do to improve it?
...
0
votes
0
answers
117
views
Socket Programming in C - How can I change my IP?
I would like to know how it is possible to change my IP address in C. Suppose I have a server that I want to connect to in C with the functions socket(), bind(), listen(), accept(), receive() and send(...
0
votes
1
answer
29
views
socket pickle setup hangs during streaming
I am trying to stream a large numpy array from server to client multiple times (using while loop). But it would just sit hanging without doing anything.
I am using python 3.11 with pickle protocol 5.
...
1
vote
0
answers
56
views
Java UDP client-server only works on one network
Today I was writing some code that handles UDP communication so I can use it as a black-box in some projects, but I ran into some issues. It only worked when I opened the client on my home Wi-Fi ...
0
votes
1
answer
56
views
Python server using the socket module not working over two devices over two different locations [duplicate]
This is my first project working with sockets and unfortunately, it's been quite painful. I'm trying to make a simple chatroom, however, it only ever works when the socket IP is local (e.g. 127.0.0.1)....
0
votes
1
answer
45
views
Connecting different machines with common file system via UDS sockets
I am trying to connect 2 EC2 instances using UDS sockets and share some data between the 2. Now, it is known that UDS sockets cannot be used to establish a connection between 2 different machines(...
1
vote
1
answer
48
views
Unix Domain Sockets mismatch in the messages sent and received
I have created pretty basic client and server programs that use Unix-domain sockets to send messages from the server and the messages are captured by the client
The problem that I am receiving is that ...
0
votes
0
answers
147
views
Traffic from raw C socket to UDP server shows up in tcpdump but server doesn't receive/print out data
I have been meaning to learn C raw sockets, so I have programmed a UDP server using DGRAM sockets and a client using raw sockets. My goal is to create a UDP packet from scratch and to send it over the ...
1
vote
0
answers
77
views
My read() is returning -1, but i cant see why?? TCP socket programming in C
I am doing an assignment where we code a server and client that use a TCP stream socket to transfer file name, file size, etc.
I have the code for the server and client, and it currently sends the ...
-1
votes
1
answer
51
views
Server socket accepting connection only once
I am learning to work with C sockets, and have created very basic client and server programs for the same
Client Program
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>...
2
votes
1
answer
158
views
Does Zig's HTTP client allow you to get access to the file descriptor for the socket?
It's not clear if Zig exposes the filehandle descriptor for the socket in client.request.reader()? Does it? And if so how do you get access to it?
0
votes
0
answers
56
views
Socket programming client side
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <string.h>
...
0
votes
2
answers
107
views
Why won't my client nor server send messages to each other?
For my networking course, I am tasked with turning a OneWayMesg (Client sends messages to Server) program to a TwoWayMesg (Client sends messages to Server and Server sends messages to Client).
In ...
0
votes
1
answer
72
views
How to avoid blocking connect() on unresponsive servers [duplicate]
I am trying to connect to 80 and 800 ports on 1.1.1.1. I expect connect() to fail on 1.1.1.1:800, but instead it blocks my program completely.
I tried using SOCK_NONBLOCK, but doing asynchronous ...
0
votes
2
answers
65
views
Socket.io communication between server and client - not receveing messages from client
I have an application server and client with socket.io, and I'm trying to have a communication between them. Unfortunetely it's not working as expected.
In general the process is like.
1 - Initiate ...
0
votes
0
answers
33
views
Eshop with sockets - file reading/writing problem
I have a question about package structure and reading and writing into files.
I am coding an eshop to learn java and now implented data exchange via sockets.
Since I am not using a data bank I am ...
0
votes
1
answer
72
views
Client doesn't receive message from server (Socket programming)
Every game tick, a server wishes to send each connected client a message, using the sendGameWorldSections() method. It does this in a new thread, so that the game ticker keeps running and doesn't ...
0
votes
1
answer
538
views
Target machine refusing connection with client [WinError 10061]
When i run my code on my own machine the client and server connect smoothly but when attempting connection to another machine (server hosted on my computer and another computer trying to connect) i ...
0
votes
0
answers
31
views
In Network programmation what happens if If the sender writes a byte and then does nothing else
I would like to answer this question empirically and theoretically :
If the sender writes a byte and then does nothing else (neither reads nor writes to the socket), for one minute... .
Will this ...
0
votes
0
answers
103
views
Why does my C# TCP/IP Socket Connection to a Print System crash after an hour?
C# Socket Communication Client to Print System
I need to talk to a Print System via TCP/IP Socket connection.
I used/modified a code snipped from MS to start a TCP/IP Socket connection and send data ...
0
votes
1
answer
91
views
Haxe server socket stops and does not recive messages from client after connecting?
I have my server written in haxe using sys.net.Socket, and clients connect to server succesfully, however after starting a thread for client, it stops at the line where it should recive the message, ...
0
votes
0
answers
762
views
IMAP responds with LOGIN BAD invalid command
I'm trying to write an IMAP client in C#. I'm able to connect to the host but unable to get expected responses after that (when using, for example, commands like LOGIN or CAPABILITY).
Here is my code:
...
0
votes
0
answers
44
views
TCP sockets: string sent by Client can't be analyzed correctly by Server in if-query
In a simple TCP server written in C, I have a function that reads a string from a client, and then checks in a if-query if it matches "GET /index.html HTTP/1.0\r\n". However, when a Client ...
-2
votes
1
answer
69
views
Why can I not have two clients connected to the server?
Client.Java
package connection;
import java.io.*;
import java.net.*;
public class Client extends Connection {
private Socket clientSocket;
private BufferedReader socketInput;
private ...
0
votes
0
answers
180
views
How to resolve ConnectionRefusedError: [WinError 10061] when trying to connect to Tic Tac Toe game using socket programming from a different machine?
I have built a Tic Tac Toe game using socket programming in Python, with a server and a client. The server is running on one machine and the client is running on a different machine. When trying to ...
0
votes
0
answers
81
views
How to keep connection and get correct data from client in Socket?
I tried to connect between server and client via Socket.
So, I want to keep this connection of them, and then listening data from client. If data is correct condition, then the server will reply with ...
1
vote
0
answers
36
views
Python Client Isn't Outputting Anything from Server
I am just learning about networking and can't figure out why my computer isn't outputting what I expect.
I have created a simple server:
import socket
host = "127.0.0.1"
port = 5000
s = ...
0
votes
1
answer
102
views
Python socket programming: Sending a list with 200000 integers without splitting the list [duplicate]
I have a client-server code. On the client side, I want to send a list with = 200000 such as:
my_list = [1] * 200000
by socket programming. However, I do not want to split the list. All the lists ...
0
votes
1
answer
79
views
How can I run an algorithm that produces a message in one client and send that message to another client through server in Python?
I'm doing a project in which I have a webcam that's recording and an algorithm that detects an object in the webcam feed, tracks it and when the object reaches an area of interest in the frame, a ...
0
votes
2
answers
495
views
Python: Send list of multidimensional numPy arrays over socket
i wish to send a list consisting of multi-dimensional NumPy arrays over the socket to my server and restore its format right after. The List of arrays (variable aggregated_ndarrays) looks like the ...
0
votes
1
answer
952
views
Is it possible to replicate the net::ERR_CONNECTION_RESET error at the client-side when making an API call or using a WebSocket?
I developed a live view application using Elixir, specifically a Phoenix application, and have been running it in the browser for an extended period of time. Occasionally, I encounter an error, such ...
0
votes
1
answer
218
views
What are possible causes of my python script ending prematurely?
I have a python script that communicates with other software through TCP/IP protocol. It receives data in XML format from the software. This worked fine. However, since it is part of a larger project ...
0
votes
0
answers
70
views
Send data from server to client using UDP channels in java
It's my first time working with UDP channels and I am trying to send back data from the server to the client, but I am getting the following error
java.net.BindException: Cannot assign requested ...
0
votes
1
answer
516
views
Can't run client-server socket on port 5000
I have a school assignment to create a server client socket and run it specifically on port 5000. When I do, I get the error "OSError: [Errno 48] Address already in use". I ran sudo lsof -i:...
0
votes
0
answers
130
views
Python sockets cant connect to the server
I cant connect to the server with client over the internet both on different windows machines. here is the server's side code:
import socket
def getPublicIP():
import requests
response = ...
-1
votes
1
answer
47
views
I'm misunderstanding something on how to set up sockets, but I'm not suer if it's client side, server side, or both
I'm setting up a simple program to test starting a server, and I'm getting a silent failure state. My client seems to think it has sent, while my server doesn't think it's recieving. The two are ...
0
votes
1
answer
123
views
Server not receiving messages from client
Hi This is my first post here. I am making a chatroom in Python using sockets and I have written the code for the server and client side. I am successful in establishing a connection between the ...
0
votes
0
answers
508
views
Java SocketException after trying to send and receive data on the same socket connection
I am working on a project in Java and I am trying to send an object from the client to the server and then waiting for a String response, but I get SocketException with the message "Socket is ...
0
votes
0
answers
41
views
How to send a chatlog of all written chats to a newly joined client using socket programming in Python?
I have written a simple server and client py using UDP. The base is working, however I want that every time a user (client) joins, he would receive a chatlog of everything that has been said.
This is ...
0
votes
0
answers
40
views
Why cant I write to a socket's input stream java
So I Have two Similar classes to test Sockets that are the same from the lines down.
public class Server {
public static void main(String args[]) throws IOException, InterruptedException {
...
1
vote
1
answer
530
views
How can I send clients IP address with data from server to another client?
I have developed a program which works like client-server-client model.
I have achieved everything and successfully have a running code for me to:
send information from one client to another with ...
0
votes
0
answers
102
views
socket python library. client crashes
I start the server, then the client, the server gets the data and the client does not get a response, crashes
server
import pygame, socket, time
pygame.init()
main_socket = socket.socket(socket....
0
votes
0
answers
372
views
Error 10038 (Socket operation on invalid socket) when trying to send a string from Winsock2 C program
I'm trying to make a C library that mimics Python socket library.
When i run my main function, an error occurs on simplesend(sucket, "foo");
the whole main function:
int main(){
struct ...
0
votes
0
answers
33
views
Server dont send photo to all clients
Hi i develop chat gui with socket. I want to send text and photo message. Photo messages came to server but server don't send to clients. i wrote for send photo code inside '''. When I write server.py ...
-2
votes
1
answer
205
views
Server only sending one message to client
My Server is only able to send one message to the client (HELLO), the client then sends a WORD message and after the server had received the WORD message it's supposed to send a word.
For some reason ...