Skip to main content
Filter by
Sorted by
Tagged with
4 votes
1 answer
239 views

I am trying to compile my code with openssl library. My code is printf then the program received SIGSEGV signal. Code of test.c: #include <winsock2.h> #include <openssl/ssl.h> #include <...
Orang Keren's user avatar
0 votes
1 answer
131 views

I'm trying to transmit a large chunk of data using WinSock2 from my Ubuntu Server (running wine) to my Windows Client. This is the client code: int expected_length = 0; recv(m_Socket, (char*)&...
pogrammerX's user avatar
0 votes
1 answer
75 views

On Windows Server 2022 I'm running a custom HTTPS server (part of a larger app). The service binds, listens and then accepts on port 81 for a while and netstat -abn shows: TCP 0.0.0.0:81 ...
DougN's user avatar
  • 4,707
1 vote
1 answer
137 views

I have a console app where I'm working through setting up a UDP listener using RIO. I started with simple polling to test the flow between a simple console client and the console app/server. I can ...
Mike's user avatar
  • 13
0 votes
0 answers
47 views

I'm using a socket to retrieve image data from a camera. This works properly, if the camera is continuously sending data. But, when the camera is in manual trigger mode and we wait for a while (maybe ...
0b1001001's user avatar
1 vote
1 answer
74 views

In Windows, for a interface, you can set DNS suffixes to add to queries. How do one retrieve the settings dom1.com, dom2.com using winsock2? If I call GetAdapterAddresses the IP_ADAPTER_ADDRESSES_LH ...
leiflundgren's user avatar
  • 2,988
-2 votes
1 answer
88 views

I have this select waiting for data in the socket buffer. When there is data in the buffer, I launch a thread and accept the connection. while (!InterruptWaitForConnections) { const int status = ...
IVANEZEDITIONS's user avatar
-2 votes
1 answer
66 views

I'm writing a bit of code that can listen for UDP messages via Winsock. The port bind works on local loopback (127.0.0.1) but when I try to change to any other IP the bind fails. Is there something I'...
MaxA's user avatar
  • 13
0 votes
1 answer
174 views

I've downloaded and successfully compiled the Microsoft Winsock Client and Server Code Sample from here. This client server combination application both work just fine running on the same computer. ...
blogger13's user avatar
  • 305
0 votes
1 answer
79 views

I try to build a multi thread server so when there is multiple concurrent request, the server can handle them at the same time. But, my code still require for waiting first request to be done before ...
randomize_atk's user avatar
1 vote
1 answer
74 views

I am working on designing libraries in C and C++ for my company's proprietary language through ffi. The two libraries which are causing the problem related to the title are the threads and sockets ...
JSGuy's user avatar
  • 126
1 vote
1 answer
308 views

I'm looking to programatically mark the Type of Service / DSCP byte in packets from a network socket. The current implementation in C# is below: UdpClient udpClient = new UdpClient(); string ...
jlwilson's user avatar
0 votes
0 answers
43 views

I saw some code examples to explain select() can handle multiple events at the same time as below: FD_SET readfds; FD_SET writefds; FD_SET exceptfds; FD_ZERO(&readfds); FD_ZERO(&writefds); ...
just_code_dog's user avatar
2 votes
0 answers
132 views

I was debugging some 64 bit, native C code using WinSock2 for TCP and after eliminating all of the errors I expected, I found out that WinSock2 was doing something I did not expect. Simplified for ...
Steve Valliere's user avatar
2 votes
1 answer
116 views

As I was told here: can you typecast an int into 4 chars using structs?, typecasting a struct into another struct pointer is against the "strict aliasing rules". But I think that in C ...
bangingmyheadontable's user avatar
0 votes
2 answers
80 views

I haven't found an explanation to why you would put an asterix after a variable. This is the example: int main(){ WSADATA Winsockdata; WSAStartup(MAKEWORD(2,2), &Winsockdata); int ...
bangingmyheadontable's user avatar
0 votes
2 answers
294 views

OBEX is probably the most commonly used technique to transfer files over devices that support Bluetooth. On the contrary , with being the most common , it is not very well documented how this thing ...
CoderBittu's user avatar
0 votes
0 answers
69 views

I'm caught by a strange problem. A listening QTcpServer that is working normally suddenly stops accepting new connections (qBittorrent webui stop working). I did a little digging into Qt's source and ...
isudfv's user avatar
  • 527
1 vote
0 answers
27 views

I am trying to interface Matlab with a C code that I used to read data through UDP. I am using the winsock2 library, and compiling the C code into a DLL file for it to be loaded into Matlab. My C code ...
Tamim Akhtar's user avatar
0 votes
1 answer
227 views

I'm creating a project using winsock2's sockets I'm using a syscall to connect to a socket on a local IP address, then I implemented a simple method for error handling purposes. // Client-side int ...
thibaultk's user avatar
0 votes
1 answer
92 views

I'm currently developing a TCP server and I use multi threading, so for this I init a server using a Server.start() which give me a fd like and then I init an infinite loop to accept and start new ...
B0tm4n's user avatar
  • 25
0 votes
0 answers
70 views

I tried to make a server socket for connecting client sockets via internet. I found nothing in google. Unfortunately, it works only with my local network. It responds when I connect to 127.0.0.1 ...
Sasha Tim's user avatar
0 votes
0 answers
32 views

Server code #pragma once #include <WinSock2.h> #include <tchar.h> #include<WS2tcpip.h> #include <map> #include <string> #include <iostream> /* struct sockaddr_in { ...
Ethereal's user avatar
1 vote
2 answers
286 views

I am using the Windows OS and am coding in C, currently. I am a complete beginner in socket programming, and have this following piece of code that is returning unwanted values. (MAXLINE = 4096), and ...
NWA_fan's user avatar
  • 13
-1 votes
1 answer
121 views

I'm trying to learn low level networking in c, and have gotten as far as making TCP client and server programs that make, bind, connect, accept, etc. sockets using winsock. They work just fine, and my ...
Joshua White's user avatar
-2 votes
1 answer
280 views

I can send and receive data on different threads using the TCP protocol as demonstrated in the following code, how can I do the same using the UDP protocol? #include <iostream> #include <...
João Carlos Dantas Lopes's user avatar
0 votes
1 answer
207 views

Hello everyone I need to convert std::vector<uchar> to const char* or send std::vector<uchar> over socket using winsock2.h in windows system. How can I do this? I'm compress one image: std:...
João Carlos Dantas Lopes's user avatar
-1 votes
1 answer
213 views

I want to implement the function 'Send a file' in the image enter image description here I want to implement step 4 in the link Send files over Bluetooth in Windows I set the guid below, ...
Stacey's user avatar
  • 11
0 votes
1 answer
201 views

I'm a beginner. The function requests the following parameters: int recv( [in] SOCKET s, [out] char *buf, [in] int len, [in] int flags ); The second parameter requests me to pass ...
Nicholas Fresta's user avatar
0 votes
0 answers
16 views

i'm coding a http request library for a project. I'm using winsock2's sockets to create http requests and i don't know what i'm doing wrong. There is not much on google about http requests in c so i ...
AleDev's user avatar
  • 11
0 votes
1 answer
131 views

I'm currently trying to understand how to establish a server-client connection under Windows using the header file "winsock2.h". I have done the "Getting started" from Microsoft (...
Sky64Redstone's user avatar
0 votes
1 answer
514 views

Hello, i'm coding a client with sockets (i usually do that in unix but i wanted to try in windows) with the winsock2 library. When i'm connecting the socket to an ip i get error 10038. I googled msdn ...
AleDev's user avatar
  • 11
1 vote
2 answers
105 views

I compiled both client and server code using the following commands: server : gcc server.c -o server.exe -lws2_32 client : gcc client.c -o client.exe -lws2_32 Both codes are successfully complied and ...
Chandima Maduwantha's user avatar
1 vote
1 answer
345 views

I'm doing some testing with a TCP client on Windows 10 (10.0-19045) but due to firewall restrictions I need to run my experiments from a local port < 1024 (not negotiable). I thought that this was ...
Roland Mainz's user avatar
0 votes
0 answers
242 views

I have a console application running as a TCP client using Winsock2. This application connects to a server which regularly provides measuring data, and needs to get some configuration from my client. ...
bongo's user avatar
  • 1
0 votes
0 answers
214 views

I'm revisiting winsock after all these years with fresh eyes and can't seem to understand why SOCK_STREAM and IPPROTO_TCP are both necessary to specify in the pHints parameter of getaddrinfo: INT ...
Edward Severinsen's user avatar
3 votes
1 answer
368 views

Does Win32 getaddrinfo() use C:\Windows\System32\drivers\etc\hosts? We want to use C:\Windows\System32\drivers\etc\hosts to specify IPv6-only addresses (which are NOT part of the DNS), and let our ...
Roland Mainz's user avatar
1 vote
1 answer
108 views

Does Winsock2 have an API to define which TCP port a client uses to connect() to a server? We need to connect() to a UNIX server, which only responds if the client TCP port is < 1024 (Reserved ...
Cedric Blancher's user avatar
0 votes
0 answers
148 views

I wonder which data type is the most suitable for representing bytes I send via Windows API winsock. I'm currently working on receiving and sending data frames on network sockets, as well as a CAN ...
le1nax's user avatar
  • 37
0 votes
1 answer
127 views

For some reasons and educational purposes, I developed myself a C++ HTTP server from scratch which should capture file uploads from an HTML page with AJAX handling dynamic requests and save it in the ...
CoderBittu's user avatar
0 votes
1 answer
148 views

I'm programming a multithreaded server in windows using winsock2 (linking with ws2_32.lib and pthread), but am having trouble trying to set a socket to persistently triggered mode. Thanks :) I've ...
Seamus Pitcher's user avatar
0 votes
1 answer
396 views

Winsock docs mentions IPsec secure extension for sockets but it does not mention SSL anywhere, Is there a way to use SSL with the created socket without using third party libraries such as OpenSSL or ...
loaded_dypper's user avatar
1 vote
1 answer
271 views

I am trying to dynamically link winsock functions starting with WSASocket, the following code compile just fine #include <stdio.h> #include <winsock2.h> #include <windows.h> typedef ...
loaded_dypper's user avatar
-1 votes
1 answer
286 views

Everytime when I've tried to use my client to connect to the server on port 2997, it simply didn't work. Nothing happens, no message confirming and no error message. I executed the client as Admin on ...
César Espíndola's user avatar
0 votes
1 answer
133 views

I've been trying to write a simple server-client connection using Winsock2. I've written similar server-client code before and have copied and pasted the same code from a previous project I made, I ...
BackSpace7777777's user avatar
0 votes
1 answer
180 views

I can no longer create a server listening on port 64951 or 64952 under Windows 10. I got an exception on my C# program when I tried to bind to 0.0.0.0:64951. Same on a C++/Qt program, the error is : '...
Aminos's user avatar
  • 881
0 votes
0 answers
334 views

I've been trying to increase the size of the socket buffers (specifically the receive side buffers for UDP packets) using the winsock2 setsockopt function as such: u_long iMode(1); handle = socket(...
Valdez's user avatar
  • 86
0 votes
1 answer
53 views

So, I'm having a problem, I'm trying to do a simple c server-client, where basically a client connects to the server, and from time to time the server pings the client, shouldn't be this complicated, ...
Fred Esch's user avatar
1 vote
1 answer
177 views

I'm porting my program from Unix to Windows, and I have a problem with the recvfrom() function to accept a packet. I haven't written anything with Winsock until now. I think I've done everything, ...
lomaster's user avatar
0 votes
0 answers
38 views

I wrote a server app using winsoch2.h to serve as a group chat server using single thread. It is a console application. I wanted the app to accept multiple clients trying to connect to the server, ...
Felix's user avatar
  • 1

1
2 3 4 5
20