Questions tagged [winsockets]

78 questions
0
votes
1 answer

C++ socket server doesn't accept any clients / client won't connect

I have a simple class that starts a server and listens to clients and after they connect it starts a thread for them, my problem is that when I run the server it seems to be listening and when I try to connect using simple python code the server…
DaCurse
  • 795
  • 8
  • 25
0
votes
1 answer

Issues with UDP client to UDP server with 10057 error

I have an issues of connecting to my UDP server. On VS it showed no errors except when I do an error checking it give me a Error 10057. UDP Client: #define _WINSOCK_DEPRECATED_NO_WARNINGS #include #include #include…
user8454
  • 9
  • 3
0
votes
1 answer

timeout for blocking TCP socket not working

Please note: the platform is Windows, not Linux. I have a blocking TCP client socket. After connecting to the remote server, I set a read timeout (as the remote server is not stable, the network condition is bad) and then receive data. Sometimes,…
aj3423
  • 2,003
  • 3
  • 32
  • 70
0
votes
7 answers

How to make an network-ip scan in c++?

I am experimenting with C++ winsockets. I want to create a method with which I can find the server on the network, without knowing it's IP. To do this I simply loop my connect method through IP adresses 192.168.1.0 to 192.168.1.255. However, the…
user23163
  • 515
  • 2
  • 9
  • 15
0
votes
0 answers

Why does net.socket.connect not work under Win10 (working under win7)?

using this code IPEndPoint remoteEp = new IPEndPoint(ipAddress, port); this._sender = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); this._sender.Connect(remoteEp); to connect to an other computer works fine under…
PBum
  • 123
  • 10
0
votes
2 answers

How to get the ip address under Windows

all i already had a "socketfd", and i was wondering how to use it to retrieve the local ip address. under linux, i can do something like this(not exactly correct): struct ifreq ifr; ifr.ifr_addr.sa_family = AF_INET; ioctl(socketfd, SIOCGIFADDR,…
Heisenburgor
  • 107
  • 1
  • 6
0
votes
3 answers

Windows Sockets for inter-thread communication

I have a thread that waits on a blocking call (via select) and want it to communicate with the parent thread at the same time. Since, it can be involved in a blocking call when parent sends it a message, I cannot use WaitForMultipleObjects. I was…
rajat
  • 864
  • 1
  • 9
  • 23
0
votes
2 answers

How to use data receive event in Socket class?

I have wrote a simple client that use TcpClient in dotnet to communicate. In order to wait for data messages from server i use a Read() thread that use blocking Read() call on socket. When i receive something i have to generate various events. These…
particle
  • 3,280
  • 4
  • 27
  • 39
0
votes
1 answer

How to get domain name from Given IP in MFC (VC++)?

How to get domain name from Given IP in MFC (VC++) ? The code i am using is as below: #include "stdafx.h" #include #include #include // link with ws2_32.lib #pragma comment(lib, "Ws2_32.lib") int _tmain(int…
Swapnil Gupta
  • 8,751
  • 15
  • 57
  • 75
0
votes
0 answers

CAsyncSocket 10093 error

I inherited from CAsyncSocket, implement my own class. Firstly, it starts like: MyClient::MyClient()//this is the constructor, I will create the socket in this constructor { if (!Create(0, SOCK_DGRAM, FD_READ | FD_WRITE)) { UINT errCode =…
firstaccount
  • 155
  • 2
  • 13
0
votes
0 answers

WSACleanup called from dependent library close unintentionally MySQL connection

I have a desktop application which use MySQL database. The application worked fine unless I add a new dependency which is a dll library which communicates with special hardware using socket. This new library call WSAStartup and WSACleanup to start…
Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
0
votes
1 answer

loadrunner winsocket send special characters in buffer ~

I am working on a loadrunner winsocket script. The buff that should be sent has a special character "~", when loadrunner sends the request it sends it as "~7e". Request to be sent - FBE442757F3FA860~1cFFFF0222050017200181 Request that is sent to the…
Anna Sundaram
  • 71
  • 1
  • 1
  • 6
0
votes
0 answers

Initialise WinSock when using C#?

I have a problem with a C#-application that makes use of a DLL which itself opens a TCP/IP connection. My problem: this DLL does not work when called from C#. I know from other application a function WSAStartup() has to be called to initialize…
Elmi
  • 5,899
  • 15
  • 72
  • 143
0
votes
1 answer

Load Runner Windows Sockets program lrs_save_param parameter issue(Error Code :9005)

Load Runner Windows Sockets program lrs_save_param parameter issue(Error Code :9005) is seen In the Data.ws file i have declared the buffer as follows recv RecvBuff 30 In Action part my code is as follows lrs_receive("socket", "RecvBuff",…
user4391664
  • 157
  • 1
  • 2
  • 12
0
votes
1 answer

Not able to receive data from UDP server in win32 UDP socket application

I have an hardware ARM control as UDP server and I am communicating to it via the code below written in C#. PC is UDP Client. Server simply echoes the data. This works fine without any issue and this is stable. using System.Net.Sockets; using…
SHRI
  • 2,406
  • 6
  • 32
  • 48