Questions tagged as 'socket'

1
answer

Send String via Java socket

I have my Client and Server classes. I want to send the StringString store to the server. I have already tried several methods but the error or it sends an empty String to server. Can anyone give me a light of what I'm doing wrong? public clas...
asked by 26.02.2017 / 01:34
1
answer

Difference between recv and read, send, and write

I'm transmitting and collecting data from a connection using Sockets , to send the data to the served, you can use the send and write commands, and to receive the data recv and read . Is there a difference in th...
asked by 22.11.2016 / 18:11
1
answer

Socket I.o does not update automatically

Hello, I'm using the Socket i.o and when I send a POST / EnviaTemperatura, it is not automatically updating on my site. What am I doing wrong? Node.js app.post('/EnviaTemperatura', function(req, res){ temperatura = req.body.temp;...
asked by 05.10.2016 / 14:13
1
answer

Specification and Implementation Java Socket

I created a class MySocket that extends java.net.Socket , however I saw that the java.net.Socket class implements the java.io.Closeable interface, and my question is: In my MySocket class I have to implement the...
asked by 02.09.2016 / 20:34
1
answer

Dns.Resolve () vs Dns.GetHostEntry ()

The Resolve method is obsolete, and Microsoft directs you to use GetHostEntry . However when using GetHostEntry the exception occurs:    This host is not known When I use Resolve there is no exception and the pr...
asked by 17.08.2016 / 17:09
2
answers

Convert an IPAddress to string

This code gets the default gateway , but I can not convert the result to string and put it in a label . public static IPAddress GetDefaultGateway() { var card = NetworkInterface.GetAllNetworkInterfaces().FirstOrDefault(); if(c...
asked by 24.06.2016 / 02:24
1
answer

Reading via Socket

I'm reading strings sent via socket to a server in Java. I get a line but when it reads it comes with breaking, looking like two lines. What I got should be: 78780103554880201238560006d0d8 But it comes: 7878 0103554880201238560006d0d8...
asked by 09.12.2015 / 12:51
1
answer

Data type via socket

Is there any way / trick / algorithm to let me know what kind of data is coming via socket? I can send both text and files via socket, but I'd like to know what I'm getting to handle differently. Any ideas?     
asked by 09.10.2015 / 16:10
1
answer

Doubt with sockets (WinSocks)

Good, I'm learning how to work with sockets (I've never worked) and decided to start with winsocks. At the moment I'm using winsock2.h and in the tutorial I'm following I came to a part that I can not understand how it works. HERE...
asked by 24.07.2015 / 01:43
1
answer

Socket does not send message to correct clients

When typed /msg nome mensagem should send this message to nome , but he will send it to whoever typed Manager.java private Socket cliente; public static String nomeCliente; private static BufferedReader leitor; private static P...
asked by 04.08.2015 / 02:49