winsock Questions
2
gethostbyname says No such service is known. The service cannot be found in the specified name space
This simple piece of code in Windows results in an annoying debug message printed by gethostbyname.
#include <stdio.h>
#include <winsock.h>
int main()
{
WSADATA wsaData;
WSAStartup(MA...
Pentecostal asked 13/1, 2022 at 9:46
5
Solved
'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS
I'm using Visual Studio 2015 and attempting to compile code that has worked before I updated from VS 2013.
'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNI...
3
I use Winsock 2 in C++, and wonder how to make my server stop reading from the client connection. The reading thread gets blocked in recv() and I have no idea how to abort it. One way to do this is...
4
Solved
I have been getting this error for quite some time now and Google has not been of much help either.
I am a newbie to Winsock programming and trying to learn from online resources. I am trying to b...
3
IMPORTANT NOTE: I'm aware that UDP is an unreliable protocol. But, as I'm not the manufacturer of the device that delivers the data, I can only try to minimize the impact. Hence, please don't post ...
Fajardo asked 4/9, 2019 at 13:47
6
Solved
i've stuck in a problem that is never heard about before.
i'm making an online game which uses UDP packets in a certain character action. after i developed the udp module, it seems to work fine. t...
2
Solved
Windows handles can be set to be either inheritable or not, to control whether child processes will receive them (when bInheritHandles in CreateProcess is TRUE). However, using SetHandleInformation...
3
Solved
So I've been looking into overlapped IO for sockets for a server application I'm building, and I keep seeing comments of people saying "never use hEvent" or "IO completion ports will be faster", et...
3
I am trying to create a UDP multicast socket program using VS2015 (C++ console application).
I got the following error,
Error C4996 'inet_addr': Use inet_pton() or InetPton() instead or define ...
Coati asked 26/8, 2015 at 18:44
6
Solved
I've just started learning winsock through the "Beej's guide to network programming" book. I'm programming under windows and running it through gcc. This is just a start to writing my first server ...
6
I'm using 2 computers with an application to send and receive udp datagrams. There is no flow control and ICMP is disabled. Frequently when I send a file as UDP datagrams via the application, I get...
5
Solved
I'm currently working on a UDP socket application and I need to build in support so that IPV4 and IPV6 connections can send packets to a server.
I was hoping that someone could help me out and po...
5
Solved
I am creating a UDP socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP) via Winsock and trying to recvfrom on this socket, but it always returns -1 and I get WSAEINVAL (10022). Why?
When I bind() the port, ...
1
Solved
I'm trying to make a client which can send custom packets to a server using raw sockets. I've had success with udp packets but when I try to switch to tcp ones, wireshark doesnt catch anything.
I h...
Zelig asked 1/7, 2022 at 20:13
3
Solved
I am writing a cross-platform library which, among other things, provides a socket interface, and while running my unit-test suite, I noticed something strange with regard to timeouts set via setso...
2
Solved
I use file descriptors to find the readable sockets and go on to read. For some reasons, a socket that has no data on the wire, goes on to read and never returns. Is there a way I can come out of t...
3
Solved
In my C++ class, I use sockets.
I have some errors when linking because, in my opinion, the library winsock.lib is missing.
I included these:
#ifdef WIN32
#include <winsock.h>
typedef i...
Ternan asked 12/2, 2012 at 15:16
2
Solved
I am new to ZMQ. I find ZMQ socket implementation much simpler than winsock. But my doubt is that "can a client created using ZMQ TCP socket talk to conventional TCP server?" in other words Can my ...
1
Solved
I am using timeout for sending and receiving data on a socket. I found that timeout can be achieved either by setting socket to non-blocking mode and using select or by using setsockopt with SO_SND...
3
Solved
I'm including as it's required by the MySQL C library.
The auto-complete in VS2010 is also showing a - any idea what this is?
Are they interchangeable, and are there any advantages of one over th...
0
Our software (Nmap port scanner) needs to quickly determine the status of a non-blocking TCP socket connect(). We use select() to monitor a lot of sockets, and Windows is good at notifying us when ...
2
I want to write a client/server application, in which client and server can exchange messages.
Client site communication:
send
recv
send
recv
Server site communication:
recv
send
recv
send
How...
2
3
I'm using ForcebindIP to point an app at a specific network adapter, like this:
forcebindip -i 192.168.0.5 MyCSharpApp.exe
This works fine and the app isn't aware (or doesn't access) any of the ...
Kamat asked 23/10, 2019 at 11:26
5
I am using Code::Blocks, MinGW, and Windows. Im trying to initialize the winsock so that I can work on a project. I keep getting the error Undefined Reference to WSAStartup@8 Anyone know how to go ...
Robbi asked 20/12, 2015 at 19:15
1 Next >
© 2022 - 2025 — McMap. All rights reserved.