Questions tagged as 'socket'

1
answer

How to solve the error undefined reference to '__imp_WSAStartup'

I thought how can I access web pages through a program in c ++? one thing led to the other and I found myself reading about Sockets on the microsoft page Creating a basic Winsock application and initializing Winsock . Well, put all the code...
asked by 19.03.2017 / 05:08
1
answer

Query socket io in nodejs

I try to send data from a client to an endpoint in nodejs and with socket io graph this in real time on a graph of temperatura vs tiempo . Part of the client: else{ sensors=["Rimac","Cercado"]; for (sensor in sensors){ var dat...
asked by 06.07.2016 / 11:22
1
answer

The discarded object can not be accessed. Object name: 'System.Net.Sockets.Socket'

I have been dealing with a problem for many days that I can not solve, I hope that a charitable soul will discover the error. I am using sockets to send messages and receive them from a server, the fact is that when I try to open the socket a se...
asked by 08.06.2017 / 22:49
2
answers

How can I send a file through a socket?

I'm doing a little chat with sockets in python, I'm trying to make it possible to send files through the chat, I thought about this to send the file: file = open("file.txt", "rb") content = file.readlines(1024) sock.send(content) file.close()...
asked by 10.08.2018 / 02:33
3
answers

Python. Socket How to receive all data with socket.recv ()?

I have a problem with receiving data from the server to the client. I have the following function on the client side that tries to receive data from the server. The data sent by the Server using the function socket.sendall(datos) is great...
asked by 11.01.2017 / 15:59
1
answer

Problems when ordering an array in javascript and a chat that I am creating

I'm creating a chat with sockets on nodejs that say it's very good. Then I create an array: let nicknames = []; that will save the names of users so that later the frontend will be in charge of showing them in a list. That works perfect for...
asked by 23.07.2018 / 05:24
1
answer

Stuck reading YouTube video with C ++ and wxWidgets

I am testing the following code with a YouTube video and it stays on hold when it reaches the Read function ... it seems that it does not receive any data and after a while the socket disconnect and the application ends normally. int MainApp...
asked by 11.04.2018 / 07:17
1
answer

Doubt with the internal structure of sockaddr_in

Hi, I'm studying sockets in C and I found myself in doubt about this structure: struct sockaddr_in { short int sin_family; unsigned short int sin_port; struct in_addr sin_addr; unsigned char sin_zero[8]; }...
asked by 11.03.2017 / 01:27
1
answer

socket error: a bytes-like object is required, not str

I'm trying to make a chat in local mode using socket but it throws me the error when I enter the message to send: Traceback (most recent call last): File "C:\Users\Angel\Desktop.py", line 8, in <module> s.send(mensaje,'rb') TypeErr...
asked by 10.10.2018 / 21:42
1
answer

Connect two applications using sockets

Well my problem is this: We are starting to see the topic of sockets and I have these examples: CLIENT: import socket host = "localhost" port = 9999 socket1 = socket.socket() socket1.connect((host, port)) try: while(True): ca...
asked by 27.10.2018 / 02:52