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
-
3
votes0
answers2146
viewsC Client server application for file transfer with TCP socket and thread
I would ask for help from the forum to make secure (encrypt) the transfer of a file between two computers. Below follows the C source code of a client-server application for file transfer using…
-
3
votes2
answers2775
viewsHow to send and receive a file via Socket?
I am needing to send files via Socket on C++ Linux, as the file may have an extensive content it will need to be sent in pieces. In this case, I need to create a kind of protocol to send a file (in…
-
3
votes1
answer295
viewsJava Sockets - Beginner
I’m starting in java and I have a problem with sockets, I wanted my server to receive a value and then wanted to turn it into a String, in such a way as to be subsequently included under if.…
-
3
votes1
answer380
viewsNodejs socket client - callback for each request
I have the following code var net = require('net'); var client = new net.Socket(); client.connect(1337, '127.0.0.1', function() { console.log('Connected'); client.write('Hello, server! Love,…
-
3
votes1
answer244
viewsHow do I know if a socket is "listening" on the server side?
When I use the function isConnected() of java.net.Socket, on the client’s side, and she returns to me true can I make sure the server is "listening"? How else can I know? Only with a waiting time…
-
3
votes1
answer377
viewsWhat are files with extension "Sock" for?
Some applications, such as PHP-FPM and MYSQL, usually use in their settings a file with the extension .sock. I always see this in Linux operating systems. Example: /var/run/mysql/mysql.sock As far…
-
3
votes1
answer117
viewsSocket PHP keeps falling
I googled and found ways to work with the socket. Then I started the service in my VPS. At first everything was working ok. However, now, instantly, Socket drops, making me need to access ssh every…
-
3
votes1
answer5784
viewsERROR: "only one use of each socket address is normally allowed"
Before you say that "the door is already being used, try another one", I have received this answer several times, and changing the door simply does not work. Well, I’m developing a game that uses…
-
3
votes1
answer115
viewsHow do I know the client sent me something?
I made this code here following some tutorials over the internet. buttonAbrirConexão.Enabled = false; TcpListener servidor = new TcpListener(6554); servidor.Start(); while(true) {…
-
3
votes2
answers1503
viewsMake server socket in Tkinter allow client input
The program works properly, it creates a server for your user, the server opens smoothly. But when I use a client to access it, the following message appears in the server client: Traceback (Most…
-
3
votes1
answer125
viewsSocket Javascript does not connect (Stomp + Rabbitmq)
I am trying to establish a communication between Rabbitmq and Javascript, to recover the log information that is sent to a Rabbitmq topic, but without success. In the console is displayed the…
-
3
votes1
answer94
viewsHow to find out if TCP Listener is listening?
Library that I use: https://github.com/rdavisau/sockets-for-pcl Follows code: await client.ConnectAsync(address, port); The code above is the client and works normal. Let’s say the server is off,…
-
3
votes1
answer99
viewsCoding Problem Between Javascript Client and Python Server
I have a server socket in Python, follow the code: from socket import * host = '127.0.0.1' port = 6060 try: server = socket(AF_INET, SOCK_STREAM) server.bind((host, port)) server.listen(5)…
-
3
votes0
answers105
viewsHow to make my python server work on an external network using ngrok?
I created a server in python that runs on port 50000... Soon after that I created my client. If the two are on the same network both connect and everything is fine! But in external network I can not…
-
2
votes1
answer1315
viewsMonitor Service with Borland Socket Server
I’m developing a three-layer application on Delphi-7 , using the component TSockecConnection. It is possible to monitor the connections, identify the IP of connected users as well as taking down…
-
2
votes1
answer160
viewsServersocket and Socket
I’m trying to create a ServerSocket: public class RunServer { public static void main(String[] args) { try { byte[] buffer = new byte[1024]; String passwordCript; ServerSocket socketRecepcao = new…
-
2
votes1
answer1453
viewsImproved Application to Server Communication
I am developing an application that needs to communicate with the server (send and receive data). What would be the best way to make this data exchange safely and performance? Through REST/WEB…
-
2
votes1
answer609
viewsC socket - Client-server connection test (Linux)
I’m working with sockets in embedded system communication. I create a thread to handle the connection, but as my system uses Wi-Fi connection I need to perform some way a connection test before…
-
2
votes1
answer126
viewsStoring SOCKET in a vector
I am working on a project developed in c/c++ where a server handles several connections, I do not have much experience in this language, I would like to know how I should proceed to add a SOCKET in…
-
2
votes1
answer2236
viewsHow to leave my app open waiting for the server to send information
I’m creating a client app that once it changes the status of some component on the server the server will send to the client so that the user can view it. I need the app to be open by receiving…
-
2
votes1
answer310
viewsJava - Chat async
I want to implement a chat in java, which works asynchronously, and I wanted to know the best architecture to do this. I managed to make a public chat using sockets(Netty), but I got to the…
-
2
votes3
answers240
viewsHow to know which servers are waiting for connection on my network?
I’m developing a multiplayer (LAN) game with Sockets in JAVA. Players will start a lobby, and in this lobby there will be a list of servers (game rooms) waiting for connections. How can I list the…
-
2
votes1
answer89
viewsWhat’s the difference between creating a Socket via Socketfactory and creating one with new Socket?
I was studying about Sockets and saw that some people created sockets with Socketfactory (javax). I’ve always created like this: Socket skt = new Socket(host, port); In the example I was like this:…
-
2
votes1
answer227
viewsWhen I run the client, the server shuts down, why?
Once I run a Client the Server connection terminates. The while block of the run() method of the Attendant Class does not run. I did a test and the attribute running is true. I can’t understand what…
-
2
votes1
answer177
viewsAuto reconnect reusing an async socket connection
How do I get my socket to reconnect itself when the connection is lost? Preferably reusing the same connection.
-
2
votes2
answers286
viewsConvert an Ipaddress to string
This code retrieves the gateway standard, but I can’t convert the result to string and put on a label. public static IPAddress GetDefaultGateway() { var card =…
-
2
votes1
answer293
viewsWhat if I want to send and receive a "package"?
I put a mini server test online and everything worked out, the problem is that I want to send integers, booleans, strings, etc... So far I only know how to send string, how to take the first steps?…
-
2
votes1
answer4105
viewsCalculator using Java Socket
I’m doing a job at the college and I took some information from the Internet, the professor asked a client to submit 2 values and a basic operation, the server should take this and return the total.…
-
2
votes0
answers69
viewsJava socket not printing what it should
Server: BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); String s = inFromClient.readLine(); System.out.println("> "+s); This simple…
-
2
votes1
answer1215
viewsTransfer network files C#
I wonder if there is any way to transfer files on a local network without using the Socket Class in C#? and in terms of performance what is the fastest method of transferring files over a local…
-
2
votes1
answer685
viewsHow to read an XML file from the server
To create a java desktop application that accesses the internet and le an xml file. Well, this is the initial proprosito. I am using the Socket class to communicate between the server and the…
-
2
votes1
answer79
viewsDoubt with sockets(Winsocks)
Good, I am learning how to work with sockets (never worked) and decided to start with winsocks. I am currently using winsock2.h and in the tutorial I’m following I came to a part that I can’t…
-
2
votes1
answer161
viewsDoubts about security in SSL communication of Sockets
I wonder if this communication between the sockets is safe. From this code I can safely exchange information? I am also doubtful to understand how the Sslcontext class works (it is not in this…
-
2
votes1
answer133
viewsHow to close a Serversocketchannel?
I have the following code: Selector socketSelector = SelectorProvider.provider().openSelector(); ServerSocketChannel serverChannel = ServerSocketChannel.open();…
-
2
votes1
answer651
viewsHow to just send messages to other customers?
I have a question with java sockets. My code sends messages to all customers, including what you send. I want it to send only to other customers. Is there any way to do this? I test using the…
-
2
votes1
answer31
viewsSocket.Beginsend Using a lot cpu
I have an online game server and have 600 online users, but the cpu is a little high (using 10~20% of 26GHz) and the profiler says that this line is using a lot of resources Socket.BeginSend(packet,…
-
2
votes1
answer400
viewsIs it possible to make connections with Python without using the language packages?
I use several modules to connect to Python sites, such as socket and the urllib, but without the modules, how would this connection be made? I am aware that this is a complex procedure involving…
-
2
votes1
answer151
viewsUpload files working with PHP sockets
A little while ago, I decided to explore and study some sockets to be worked in PHP. So I took a good tutorial on the internet and decided to create a very simple chat where I connect the server and…
-
2
votes1
answer366
viewsJava: Problems with Wait() and notify()
Good evening, I’m doing a java project where I make connections between the client and a server. This client sends Messages to another recipient. It is up to the Server to handle this message by…
-
2
votes1
answer48
viewsNullpointerexception when connecting the server
I am making a program in Java server/client. When I start the server class I see the error Exception in thread "Thread-0" java.lang.Nullpointerexception I leave the code below so you can help me…
-
2
votes2
answers387
viewsFind Broadcast address for sending UDP message
My Wi-Fi network interface contains the following settings: Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : home Link-local IPv6 Address . . . . . : fe80::95d7:bda0:eac3:ebf7%5 IPv4…
-
2
votes1
answer94
viewsObject problems using java sockets
I’m trying to pass the person object that was instantiated on the server to the client. But I’m not getting it. Below are the classes I used: Server public class ServidorTCPBasico { public static…
-
2
votes1
answer46
views"SIGSEGV" error when receiving a large data packet
Hello, I am facing a "SIGSEGV" error when receiving a large data packet with the recv function of the library using C language on a Posix - UNIX system, if any soul can help me a thank you. buffer:…
-
2
votes1
answer78
views -
2
votes1
answer725
viewsERR_SSL_PROTOCOL_ERROR - Socket.io and Node.js
I am running a Node.js server using Socket.io to manage connections via Socket, but I am having a problem with SSL certificates. Most users can access the Node.js server normally, but others cannot…
-
2
votes1
answer96
viewsGet exception name in Python where it is not specific
I’m using the exception Exception, but wanted to be more specific and take the correct exception, without the treatment the code returns me the following message: F: Bel Desktop…
-
2
votes1
answer157
viewsCommunicate ASP.NET with Windows Forms
The problem is the following, I work with SAT-CFE and the communication with this is done via USB which makes it impossible for my web system to do direct communication with it. What I did, I…
-
2
votes3
answers404
views -
2
votes3
answers972
viewsHow to get the buffer from the socket?
I am receiving a lot of data coming from a server, the client(the code below), after sending a message, it receives another, but I would like to know the size of the message that is coming from the…
-
2
votes1
answer755
viewsHow to save images to a server folder via sockets using python and opencv?
Hello I’m new in programming and I would like to know how to save images, (captured by opencv) in a folder created by code inside the server, I know you can do this with sockets but I have no idea…