Most voted "socket" questions
A network socket (socket) is an endpoint of a communication flow between processes over a computer network. This tag is different from websocket.
Learn more…352 questions
Sort by count of
-
1
votes1
answer108
viewsC code, url=inet_ntoa(*(struct in_addr *)ip->h_addr); I don’t understand what’s going on
I was studying sockets for this stuff https://www.exploit-db.com/papers/13634/ and I came across a code that I don’t understand what’s going on. That’s the part of the code: struct hostent *ip; ...…
-
1
votes1
answer932
viewsHow to perform functions simultaneously through a Socket?
I’m developing a program in Python that’s basically a Chat, just for training. I would like it to have functions like: microphone, webcam, message and screen sharing. I’ve managed to do each of…
-
1
votes0
answers40
viewsHow to send an object using socket c++ visual studio
I am trying to send an object to a server socket. The client and the server have the same class that I use to store the data. It’s all working this way, but I’m having problems on the server side.…
-
1
votes1
answer88
viewsCan sockets be multilingual?
Since sockets are a common choice for high-performance communication between applications of different platforms, my doubt is, that makes them also multilingual? Bringing the situation to my…
-
1
votes1
answer139
viewsIdentify/Authenticate client on websocket
I’m creating a simple server sockets in PHP, but I’m having some doubts, since this is the first time I’ve done anything like this. My doubt is how I identify the client, that is, through an…
-
1
votes1
answer434
viewsClient and Server socket with Indy
Dear, I am trying to create a program that will receive a list of products sold through a Socket connection. I can connect via Tcpclient, but I’m not able to send the list of commands, nor receive…
-
1
votes1
answer39
viewsTransmission error socket c#
I have the following code: public void StartListening() { try { btEngine = new Engine(true); IPAddress ip = IPAddress.Parse(txtServer.Text); IPEndPoint localEndPoint = new IPEndPoint(ip, 5000);…
-
1
votes0
answers64
viewsWhat is the best way to create a socket with multiple connections that will perform an action in another API
I am creating a webservice with PHP, to receive TCP connections, so I opened a socket that receives multiple connections. But when a device connects to the server I will have to search another third…
-
1
votes1
answer24
viewsSubmit data p/ database via SOCK_STREAM
Hello, I need to create a function that should connect to port 80 of the server "servername" send a request in which the list of parameters/ values of the POST request is defined based on its…
-
1
votes1
answer108
viewsHow to check if client disconnected abruptly
I have this online chat code using socket and TCPListener, but when the client simply disconnects abruptly or loses connection, it is not removed from the ArrayList so-called clients. public void…
-
1
votes1
answer545
viewsSocket in python
I’m doing the discipline of networks and computers and I’m having trouble on the following question: Using TCP, deploy a server that offers two features: uppercase and Daytime. The client, when…
-
1
votes1
answer500
viewsMultiple connections via rtsp using Opencv and Python
I recently made a basic Python script using the Opencv library for recognition using security cameras, but I realized that for some reason, I can’t open two or more connections on the same camera,…
-
1
votes0
answers69
viewssend a message from the server to the Sockets client
I recently started working with sockets this week and am having difficulties. My goal is when the client sends a message the server responded with a notification. On the client side, sending to the…
-
1
votes0
answers41
viewsIs it possible to associate one TCP Socket to another already connected and send data through it?
When I use socket.Accept() I get a connected Socket, using the option socket.ExclusiveAddressUse = false it is possible to associate (Bind) another Socket to EndPoint. But when I use the function…
-
1
votes0
answers49
viewsTwo observable watching each other? Or something different from that?
Consider a class ServidorTcp (I don’t know if this is the right abstraction; it would have two operations, iniciar() and parar()). Inside there’s a field socketServer whose type is SocketServer (a…
-
1
votes1
answer346
viewsHow to transfer file using python socket?
I’m making a program that consists of passing a file using UDP protocol. The user who runs the file client.py should have files in the root folder of the program in order to transfer to the folder…
-
1
votes2
answers93
viewsPython socket module - for loop - socket.gaierror: [Errno 11001] getaddrinfo failed
I am trying to create a script that performs connection testing on various hosts and different ports, example: 10.20.20.1,1433 10.30.30.2,1521 10.30.30.3,80 10.20.20.4,443 In the script I open a…
socketasked 3 years, 10 months ago Sabbath Doomicus Metallicus 11 -
0
votes2
answers407
viewsRead Blocker in C
I am trying to make a server in C. After receiving the client’s connection the objective is to wait for information from the client in the socket, for this I use the following code. /*Read…
-
0
votes2
answers1367
viewsLocked socket when performing data exchange
I am trying to carry out server and client code in Java for the client to send a String, the server process and return it and the client receive. The customer is kept always listening. But after…
-
0
votes1
answer182
viewsHow to release socket on the MAC OS X terminal after cancelling php code execution?
I have a PHP executable with the code below: <?php require_once("SocketServer.class.php"); // Include the File $server = new SocketServer("172.17.0.243",20490); // Create a Server binding to the…
-
0
votes2
answers1103
viewsDelphi Application Server Routine with UNIGUI
I have an application developed with UNIGUI components for Delphi XE5 and would like to know how to run a routine on the application server, without necessarily being in the browser interface. One…
-
0
votes1
answer95
viewsUnable to read Beyond the end of the stream
I was trying to create a socket connection between Java and C#, Java being the client and C# the server. But when I use Binaryreader to read the data, it returns an error: Unable to read Beyond the…
-
0
votes1
answer530
viewsSend and Receive data via Socket
I am beginner in socket, I would like to know what is the best way to send and receive data. I would like a better explanation about how it works.
-
0
votes1
answer67
viewsDoes closing Datainputstream always close Inputstream?
I need to temporarily use one Datainputstream with an inputStream of a socket. I need to use close-up on Datainputstream? And if I use I’d be closing the socket inputStream too ?…
-
0
votes0
answers111
viewsPython 3 TFTP client
I’m Doing a project in python 3, is to create a client for Protocol TFTP. If i write "get 'file'" I just can download the first data block of 512 bytes of this file but I can’t send acknowledge for…
-
0
votes0
answers76
viewsIs there a socket.io event that activates when the client’s internet is slow?
Hello. I am in a project in nodejs + socket.io, I am with big problem, in relation to the client’s slow internet, I need to know if in socket.io there is some kind of event like this // If the…
-
0
votes2
answers474
viewsSockets in java
Implement a Java program that waits for network connections directed to port 13131 and, depending on information that will be transmitted to you through the aforementioned connection, perform movie…
-
0
votes0
answers282
viewsHow do I get the same browser answer using java/socket?
The thing is, someone already had to make a request http-post implementing socket java? I need to make a request on the site http://spys.ru/en/ and take the Sponse to mine some proxys. However, I…
-
0
votes1
answer100
viewsSocket C ansi header Post
Hello I have a socket in C ansi without using adcional libraries working normally with http requests. When ordering on a new server do not get any response, using the Curl lib, results 100-continue…
-
0
votes1
answer106
viewsSend multiple variables at once socket
Using the method Socket.Send would have some way to send a package with for example an integer and a string at once? I saw such a Packet which apparently was all I needed, because I can turn it into…
-
0
votes0
answers323
viewsChat with two types of client
I wish to chat in Delphi. In a standard project where the two tips would be using a quiet Delphi application (Socketserver and Clientsocket). But my question is the following: One of the tips will…
-
0
votes1
answer337
viewsUnderstand code C++/Assembly
I am studying a Node, and in this process I decided to help in the study migrate a system in c/c++ to Node, but I am not familiar with c/c++ and I appeared a piece of code that I am not able to…
-
0
votes1
answer146
viewsWinsock remote data reading (CMD)
I have a server (remote) where redirects your shell to the client (remote), the client side is using netcat or telnet for communication. I am developing the client side for use with Windows, but I…
-
0
votes1
answer221
viewsMinecraft make the player connect to the game
Hello I have been trying to get the client to connect to the server with sockets this site has an explanation http://wiki.vg/How_to_Write_a_Client#Login but I can’t find a way to login already tried…
-
0
votes0
answers468
viewsinvalid stream header: 00000000
Good evening. I am trying to read all the files from a directory on one machine (client) and send to another machine (server) using Java Socket. However, at the end of the transfer I get the…
-
0
votes0
answers209
viewsIs there a way to connect to a socket server hosted as localhost by CMD?
I wonder if there is any way to run my server in python socket and connect to it using command prompt. Is there any way to do it?
-
0
votes1
answer46
viewsJava: Sending messages over the network repeatedly in another thread?
This is my problem: I need a message to be sent by a socket repeatedly, to do this, I created another Thread, so that the application would not be locked, so: new Thread(new Runnable(){ public void…
-
0
votes2
answers1423
viewsUpdate page without losing the value of a variable
I have a vector that receives data coming from a socket that I use for user notifications, but every time I change pages I lose all the value coming from this variable, I’m using angular on the…
-
0
votes1
answer241
viewsI can’t compare char[]
I am running a server that I did in C and is working normally, with only one exception: I cannot create a condition for the received bytes. The Write and Recv function work normally but I am falling…
-
0
votes1
answer143
viewsWhat better way to connect to a Web server using Java Web?
I am working with a Java Web application, which will constantly take a txt file, and update this data constantly in an HTML page, but I don’t know what is the best option to connect to a web server,…
-
0
votes0
answers103
viewsHow to make an SQL query via Socket?
How to get the client to pass a query to the server and then return what the client requested? Example: Client passes the server to string: sql = "Select nome From Aluno"; and the server would have…
-
0
votes1
answer786
viewsHow to get the Android device IP to be used in Socket() in java?
I’m trying to implement a point-to-point communication (device to device) and I need to get the real IP of the server device to then insert it into the client but I can’t. I’m using: ServerSocket…
-
0
votes1
answer808
viewsSend Image with Socket Java
I need to make a program able to send an image to a server (my pc for testing) when pressing a button, I already know how to select the file, but I can’t find/understand anything on the internet to…
-
0
votes0
answers78
viewsKeep Adnroid connected to ESP8266 as access point
First of all all the code works perfectly on any phone that uses an android version prior to Lollipop. From it to the most recent is that the problem occurs. What happens is that my app connects…
-
0
votes1
answer189
viewsSocket with UTF-8
I’m doing a chat that will run on network (internal), I’m just not able to make work the issue of accents and "ç". It works by running in the IDE but if I have . jar and run (on any PC) it does not…
-
0
votes0
answers266
viewsHow to listen to a Socket connection on Android
I have a socket tcp java server on the pc and a socket tcp client on android, I receive data from the server. However how do I create a server that is always listening to a port on android, ie…
-
0
votes0
answers870
viewsSocket Error ( Socket is closed )
I am making a program using sockets but a very strange error appears when I juice two numbers for 2 time. The socket goes down and I don’t know why here is the server code import…
-
0
votes1
answer563
viewsUnable to read data from the transport Connection: Connection reset by peer
Follows the code: here. Customer code is receiving an exception: Unable to read data from the transport Connection: Connection reset by peer. Why this error? And how can I correct ?…
-
0
votes1
answer180
viewsIs it possible to have multiple connections in a single socket?
The following code, allows only one client and not several at the same time. It is possible to create something, leaves multiple connected clients? $socket = socket_create( AF_INET , SOCK_STREAM ,…
-
0
votes0
answers67
viewsIs the SSL Direct Request Text CONNECT or GET? (Python + Socket + SSL)
# -*- coding: utf-8 -*- import socket, ssl, threading, select def conecta(c, a): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('123.456.789.123', 444)) s = ssl.wrap_socket(s,…