Questions tagged [windows-socket-api]
25 questions
19
votes
2 answers
Is it possible to tell if WSAStartup has been called in a process?
I've started writing an ActiveX control that makes use of sockets.
Applications that use this control may or may not also use sockets.
Is it possible for my control to tell whether WSAStartup has been called?
If not, call it. A little test reveals…

hookenz
- 36,432
- 45
- 177
- 286
5
votes
4 answers
Can calling WSAStartup() from several threads cause a deadlock?
I'm developing an app that has one TCP server and several UDP servers/listeners. Each server is a separate thread, same as the worker threads for established TCP connections. I'm calling WSAStartup() in each of the threads.
Sometimes, calling…

Misko Mare
- 113
- 2
- 4
3
votes
1 answer
Binding an ipv6 slaac address to windows IP Stack error 10049
Background:
This is the 2nd time a call to bind has stopped my project's dev progress. The first time was Selecting a socket interface for any unknown environment. bind was the perceived fault then, its opaque source code not allowing me to see the…

rtischer8277
- 496
- 6
- 27
2
votes
0 answers
Receive TCP ACKs on application level
Is there a not-very-occult way for a socket application to peek TCP ACKs somehow, so it can know how much data has arrived to the server without the need for a server to send explicit application-level confirmations?

Roman Maltsev
- 307
- 1
- 3
- 9
2
votes
1 answer
Why does my socket connect() fail after WSASetSocketSecurity()?
I'm teaching a class where I'd like to show students how open a socket in C++ and read both http: and https: webpages under both Linux and Windows. The Linux version version was a breeze with OpenSSL. But under Windows using Microsoft's WSA socket…

Nicole Hamilton
- 284
- 1
- 15
2
votes
1 answer
WSA error 10048 when binding server sockets
I started with the simple server tutorial on the msdn website in order to learn how to use sockets in client and server applications.
Once I was done following thet tutorial, I started adapting the client and server code into multithreaded proggrams…

mindoo
- 33
- 1
- 1
- 7
1
vote
0 answers
Linux to Windows PC Communication through Socket
I have used the linux part of code in windows to establish RDB communication. Though the socket opening is successful, I am unable to bind the socket with the IP Address defined. Is there any limitation between Linux and Windows over socket?
Here's…

KISHORE AVISINENI
- 11
- 2
1
vote
1 answer
What happens if multiple WSAStartup calls requesting different WinSock versions occur in a process?
WSAStartup() can be called multiple times in a single process, as long as the requested version is supported by the WinSock dll and that calls to WSAStartup() and WSACleanup() are balanced.
In addition to that, Multiple sockets using different…

Guett31
- 258
- 2
- 15
1
vote
1 answer
Getting this "10038 wsa socket" error in my code
I'm currently trying to implement a class to create and use TCP connections.
(I'm quite new in c++ so it's possible that I forgot something obvious, even though I've been seriously checking my code)
Note that later I'll be implementing a second…
user4861542
1
vote
1 answer
10057 WSA Exception when SendBuf via Socket
Client:
//is called when the client tries to log in
procedure TLogin_Form.btnLoginClick(Sender: TObject);
var LoginQuery: TQuery;
begin
//If socket not open, open it
if not LoginSocket.Active then
begin
…

Acron
- 1,378
- 3
- 20
- 32
0
votes
1 answer
Win32 multithreaded sockets
I have a server class that has a method called handle_client as follows:
void server::handle_client()
{
do {
// Accept a client socket
EnterCriticalSection(&listenSocketCriticalSection);
SOCKET clientSocket =…

vvg
- 1,010
- 7
- 25
0
votes
1 answer
Sockets Only Receives 46 Bytes of Data
I am creating a personal remote file explorer for me and my buddy to mess around with. For the most part it works as intended, it enumerates through the given directory and sends it back for the server to see. The problem is that if the buffer…

GenZKaren
- 37
- 5
0
votes
0 answers
C++ Socket API "Heartbeat"
I'm trying to make a simple heartbeat check from client to server and vice-versa, if connection on either is broken off unexpectedly it prints a message and calls closesocket.
I spent 8 hours on this and it still isn't acceptable to my mentor. Right…

D. G.
- 23
- 5
0
votes
1 answer
When file is sent via SMTP it lose some bytes. c++
i'm trying to send email via SMTP, i send multipart mail, with text part and application/octet-stream part. when i try to send not *.txt" files, for example .jpg or .docx it is got corrupted and some bytes are lost. For example, when i try to send…

Pixel
- 35
- 7
0
votes
1 answer
bind() works for ipv6 wireless adapter interface but not for ipv6 ethernet (error 10049)
Background
At the beginning of my program I build a linked list of adapter interface addresses using GetAdaptersAddresses. Later, after creating an ipv6 slaac address, calling Socket(), Bind() and Listen() all succeed where the IfType is Wireless,…

rtischer8277
- 496
- 6
- 27