Questions tagged [sockets]

An endpoint of a bi-directional inter-process communication flow. This often refers to a process flow over a network connection, but by no means is limited to such. Not to be confused with WebSocket (a protocol) or other abstractions (e.g. socket.io).

1
vote
1answer
13 views

Send UDP to local server, but not via loopback interface

I'm ultimately trying to test a UDP client, and want to make sure that it works when sending data not through the loopback interface, to avoid any subtle issues this introduces. However, even when ...
0
votes
1answer
17 views

Python share single socket across different modules

I am trying to establish a socket server and use it across multiple modules to send messages to a client. I wrote a singleton socket in say socket_server.py as below. import socket class ...
0
votes
1answer
17 views

Using Socket IO and aiohttp for data transfer between node JS and Python

My overall goal is to generate a stream of random numbers in a JavaScript file (which is run using node) and send them to a python script in asynchronous time intervals. Once the numbers are in python,...
0
votes
0answers
18 views

Why does the Python socket implementation send TCP segment with URG-flag?

I'm using python 2.7 socket to establish a TCP connection to a server, send segments (diameter requests such as CCR) and receive answers (e.g. CCA). When I refactored the code a bit in order to send ...
0
votes
0answers
16 views

Ephemeral port availability timer [duplicate]

I'm currently doing a small "client-side" program that thrashes a "server-side" program for multi-thread stress testing purposes. Both programs run on the same machine, but this shouldn't be an issue, ...
0
votes
0answers
19 views

C TCP client-server segmentation fault problem

I am trying to implement a client-server program in C with TCP for an exercise. The server should be able to serve many clients. The clients asks for some files that the server sends them. Each time ...
0
votes
0answers
15 views

Get error 401, when trying authenticate in API, with pusher and Laravel Echo

I am trying to setup a chat for learn web socket, all in laravel. But when i tried to use a Private Channel or Presence channel gives me a error 401 'Unauthenticated', so if i cant authenticate the ...
0
votes
0answers
27 views

TCP - Connecting multiple clients to a server

I'm still learning, and have spent a decent amount of time trying different things and searching around, but I still can't find an answer to my problem. If someone would be willing to show some code ...
0
votes
0answers
18 views

How can I make my server accept multiple clients in C? (TCP socket programming)

I am working on a TCP-IP chatroom and my server is only able to accept one client. This client is able to send messages and the server properly writes those back in the terminal it's running in. The ...
0
votes
0answers
15 views

socket.send() error: TypeError: a bytes-like object is required, not 'str' [duplicate]

I tried to make python2 code to python3, its almost over, but I get an error! Help if you can Python Masters. When I am connected to the server and typed the files name to download i get a problem in ...
0
votes
0answers
12 views

Using SCSocket in Swift

So this is my first time working with socket and I have app that already use SCSocket and I want to send message using that socket I was able to use the emitEvent(topic ?? "", withData: Data) to ...
1
vote
0answers
30 views

How to get a text message from a captured packet?

I made a program that sends / receives messages from the same program that is a server. Used classes TcpClient and NetworkStream. I send messages in this way and everything works. byte[] ...
-3
votes
1answer
28 views

Function not returning to caller after using socket()

As shown in my following code. I have a function to create a socket in my server application. My code compiles fine and all; however, the function (named createSocket) will not finish. Hence, my ...
0
votes
0answers
22 views

Does half shutdown of a socket cause epoll to stop receiving events?

Let's say I have a client and server model communicating with each other, and epoll is set on the server-side to wake on EPOLLIN and EPOLLOUT. From my understanding, changes in the availability of the ...
-3
votes
0answers
22 views

Network Testing with java [on hold]

I have to run a code to test network like packet loss, throughput, upload/download speed, network connectivity etc. I have 3 source machines and 10 destination machines (Linux). for all 3 source ...
0
votes
1answer
18 views

socket.recv is empty but the result is showing in Maya

I am trying to get values for the rotation of joints in Maya into an external IDE. I have successfully been able to send commands and Maya responds properly but I am having trouble understanding how ...
0
votes
0answers
24 views

Client side stops sending data?

I'm trying to send mock data from client to server and connects perfectly using UDP. I stimulate a pack loss about every 3 sends. The problem with this if i uncomment the recv part it will just stop ...
0
votes
1answer
42 views

How to send data over remote method

I'm new in Remote Method technology, and I want to create an example where I can send a string for example to the server over RMI. How can I do this? I tried like this: The client: MyInterface ...
0
votes
0answers
19 views

Cannot read from TCPSocket after initial handshake

I'm trying to write a Ruby websocket client. I can connect through a TCPSocket wrapped in a SSLSocket, send the initial handshake, and receive the expected response (HTTP/1.1 101 Switching Protocols, ...
0
votes
1answer
7 views

syn flooding attack on a telnet server that listens on multiple ports

I want to implement a telnet server which listens on different ports for different applications. How to do it in a clean and efficient way? Suppose I am able to do it, i.e my telnet server listens on ...
0
votes
0answers
16 views

Deciding between two ways to implement a socket based IPC between two JVMs

I am building a localhost server/client in Java which will have multiple clients sharing some data, therefore I needed some sort of communication between the client processes, so I decided to use ...
0
votes
0answers
28 views

StreamCorruptedException after ~1000 transferred objects

I want to transfer objects (AssignmentListener) from one Java Server to 5 Java Clients. Therefore I wrote a method to send out the message: private void sendMessage(AssignmentListener listener, ...
0
votes
0answers
16 views

Client redirection to http using socket [on hold]

I am beginner to programming. Do not scold strong. I want to implement something like proxy-server: The client in the browser enters the address of the site; As a proxy, he specifies my proxy; I get ...
0
votes
0answers
8 views

while android to FTP Server(java) image socket transferring, Server get same images unless reboot computer

I'm not good at English, but try question. android client part. I made android app. It take a picture, made picture byte[] data -> Serializable Object(with byte and String) -> objectOutputStream....
3
votes
0answers
34 views

Update terminal when receiving new data from socket server

I am trying to make a web chat client on python using the terminal and curses. However, I can't make it to refresh when there is new data on recv, I need to send a message, and then it gets the data.....
-2
votes
0answers
15 views

How to implement socket in android wear 2.0

I'm very new to programming on Android Wear 2.0 and I'm trying to establish socket connection between 2 smartwatches. I have experience in setting up sockets on Android mobile but similar ...
2
votes
0answers
32 views

How to connect two android emulators together?

I am trying to set up a multiplayer hangman android application using two emulators. I am trying to have one emulator act as the server and the other emulator act as a client. I am having trouble ...
1
vote
0answers
23 views

How to make C# socket client method `Socket.ConnectAsync()` wait for server if that method is called before server is listening on the endpoint?

In C# .NET, I'm attempting to avoid a race condition where a socket client tries to connect to an endpoint before a socket server is bound to & listening on that endpoint. One way to accomplish ...
3
votes
0answers
34 views

How do create Sequence Number and ACK in python 2.7 UDP socket

I have the code below, write now I am just putting the sequence number and ACK in the payload. I would like to know 2 things: How can I put this info into the header for both client and server How ...
-1
votes
1answer
19 views

python, client sends data to server [duplicate]

It's a small web demo. My server side is written by python-3(flask), both front-end and back-end work fine. But now I want to write another client python code and try to send data(say, 'foobar') to my ...
-1
votes
0answers
19 views

Getting error when setting listen() value on my socket

I am trying to allow up to 5 connections to my socket. Thus, I read I need to use the listen() function. To my understanding if I put listen(5), it means there can be at most 5 connections at any ...
0
votes
1answer
33 views

Restart the PHP array indexes [duplicate]

I will explain: I have a socket socket.php file that will add a connection for each user so the user has multiple connections from different devices. $clients[] = $socketChange; // array_push($...
1
vote
0answers
27 views

Unity: Live Video Streaming ARCore Camera Texture

I'm trying to use TCP sockets to stream the texture from the ARCore camera on one device to the background image on another device. I've found some great resources that have got me close. This ...
0
votes
0answers
24 views

Object reinitialization : memory allocation

Was Learning Multithread Socket programming in java : Came across this piece of code : ServerSocket server=new ServerSocket(8888); while(true){ counter++; Socket serverClient=server....
-1
votes
1answer
25 views

C sockets not receiving all data before HTTP site begins hanging [duplicate]

I'm trying to create a server in C sockets that will allow file uploads through HTTP. The problem I'm having is that I get a very good chunk of the HTTP content but then it just stops sending and ...
0
votes
0answers
10 views

SMTP problem with try exec create_connection func

i'm trying dockerize psono password manager. This solution has a SMTP server for send a validation mail from registered users. When execute the sendtestmail function that provides psono server, he ...
0
votes
1answer
16 views

Fix “[Errno 11] Resource temporarily unavailable” in Python 2.x.x?

I have two scripts server.py & talk.py server.py is supposed to listen to connections & consume data from talk.py It works perfectly on localhost i.e if I run server.py & talk.py in ...
1
vote
0answers
11 views

FTPConnectionClosedException: Connection closed without indication on Android Device

I am trying to upload an image captured by camera to FTP server, I am using FTPClient object, and it is working successfully when running the Java code on computer, but it fails when running the code ...
0
votes
0answers
14 views

How can I use UDP socket to send a msg to many Nodes on different address and different port?

I have a client that have to send a json string to many nodes in a peer-to-peer network. This client can't send json in an iterative way to all nodes, but it have to send json in broadcast. Each ...
2
votes
0answers
25 views

What's the pythonic way to make working a socket client with tkinter?

I'm trying to set up a GUI/TCP client that displays some received data from a TCP server in Python. To do so, I'm using tkinter module. I have 2 questions about the code I post below: How do I ...
0
votes
0answers
13 views

is that possible to make MongoDB in mongoose as RealTime Database like Firebase?

is that possible to make mongoDB as Real time database ? I read that mongoDB has watch() method but I am not sure how to implementation it on Mongoose, I am using MongoDB Atlas if I watch one Model/...
-3
votes
0answers
41 views

Java socket programming, bufferedReader.readLine() blocking my program

I'm trying to make a simple online snake game for educational purpose, but i'm struggling a little bit with the Socket programming. I'm a newbie to java but I'm trying to make a multiplayer and I want ...
0
votes
0answers
15 views

Is possible to communicate .net core signalr communication using web sockets on ws protocol?

.Net core web api has signalr support. So I am configured my sample application to use web sockets app.UseSignalR(routes => { routes.MapHub<CloudHub>("/signalr/...
0
votes
1answer
21 views

Implementing pop3 client

I am implementing Pop3 client in Python. I can connect to the pop3 server of my choice and I even get the first welcome message "+OK Hello, this is Seznam POP3 server unknown.\r\n" but after that the ...
1
vote
1answer
36 views

Receiving zmq messages on background thread fails on Windows

I'm trying to set up a hello world style example of asynchronous communication between two peers with zmq.PAIR by receiving messages on a background thread while using console input to send messages: ...
2
votes
0answers
22 views

I am not able to stream images from a picamera

I found some code here for a project at : https://picamera.readthedocs.io/en/release-1.13/recipes2.html#rapid-capture-and-streaming section 4.9 I successfully make it work but when i tried to put ...
0
votes
0answers
15 views

How to open a connection with a host that uses GoogleOauth2Service

I use a socket to open a connection with a host that uses Google SSO, however, I don't know how to provide my google credentials and send it with the socket to access the home page. public static ...
0
votes
1answer
34 views

Java Fx not working properly when using socket loop

i have some problem with java fx, i'm developing a Service Mail and i have a problem with showing server stage ( with java fx). By using the pattern MVC i created: 1) MainServer.java ( where i start ...
1
vote
3answers
48 views

Convert 32 bit network order to host in C

I'm trying to convert a uint32_t from network byte order to host format. I'm reading from a tcp connection 4 bytes that I store in the buffer like this: ssize_t read = 0; char *file_buf; size_t ...
0
votes
0answers
25 views

ZeroMQ is blocked in context.close(). How to safely close socket and context in C++?

Description A broadcaster broadcasts messages in a PUB socket "tcp://localhost:5556" and a STOP control signal in another PUB socket "tcp://localhost:5557". A listener receives messages. It stops and ...

http://mssss.yulina-kosm.ru