Questions tagged as 'socket'

2
answers

Make server socket not tkinter allow client input

The program works correctly, it creates a server for your user, the server opens without problems. But when I use a client to access it, the following message appears on the server client:    Traceback (most recent call last):     File "C: \...
asked by 04.01.2017 / 17:30
2
answers

Cast in sockets

Galera wanted to understand what reason to do these cast below, is it just for aesthetics? What does this really affect in the code? struct iphdr *ip; char *buffer ip = (struct iphdr*) packet; icmp = (struct icmphdr*) (packet + sizeof(...
asked by 31.01.2016 / 16:32
3
answers

How to differentiate device type from IP?

How do I know what kind of device is using an IP? I wonder if there is any way to validate whether an IP belongs to a computer, a mobile device, etc. This is to differentiate device types from IP. I'm interested in doing this in Java....
asked by 10.08.2016 / 13:46
1
answer

What's the difference between creating a Socket via SocketFactory and creating one with new Socket?

I was studying on Sockets and saw that some people were creating sockets with SocketFactory (javax). I've always created this: Socket skt = new Socket(host, port); In the example it looked like this: Socket s = SocketFactory.g...
asked by 12.10.2015 / 21:17
2
answers

Problems with sockets in java, how to send and receive messages simultaneously between client and server?

I'm working with sockets in java and I was able to find the following problem, writing the server class I sent a message to the client to read, so far, ok !! But when I try to send a message to the server from the client, I can not get the two m...
asked by 03.07.2016 / 22:57
1
answer

Python file transfer, client-server

I have a problem with my code, I need to develop an application that is able to send a file to a server and also can recover files from the server I am using a tuple to send the data to the server nome = input('Digite o nome do arquivo a ser e...
asked by 06.04.2017 / 20:05
1
answer

Sockets - Old Game / Rooster Game MULTIPLAYER

EDITED POST I'm creating the so-called 'Game of the Old Man' (or 'Game of the Rooster'), at this time I'm trying to create a feature that allows two players on different devices - albeit on the same network - to play against each other ....
asked by 26.11.2016 / 23:12
1
answer

QThreads on QT Creator

I created a server in QT Creator, and I also implemented the Threads service on it. But when I connect to the server with the application "Client" and send a data, the server does not receive ... It should receive and print the received data, bu...
asked by 21.08.2015 / 21:18
1
answer

Download with Sockets

I'm using LuaSocket and wanted to download files with it, but I do not know like, I was able to download text file like this: local file = io.open("Blabla.txt", "w") file:write(tostring(http.request("Http://pokestage.ddns.net/patch/News.txt"...
asked by 31.10.2014 / 23:47
1
answer

Multi-thread in Java Socket

I do not have experience with Java, so once again I go to the Stack to help me, I have a basic code from a server that receives a message from a client via socket and the client's code, I need to modify both, to accept connections of more custom...
asked by 06.12.2014 / 20:29