winsock

gethostbyaddr() has error 11001

I'm writing simple program to communicate between smart devices and I receive 11001 when calling gethostbyaddr(). Both devices show they are connected to the same network, but from msdn document 11001 error is Host not found. No such host is known. Does anybody have any suggestion, thanks? My code is below. void InitializeSocket() {...

WSACleanup and atExit

Hi, Is it okay to register WSACleanup through atExit function ? We have several applications that can terminate at different points in the code so we would like to avoid putting WSACleanup everywhere throughought the code. Curently we call WSAStartup / WSACleanup through DllMain since we have a dll that is used by all these applications...

How do I use OpenSSL with WinSock?

I've scoured the web and have not found anything for this... Does anyone have a simple code sample of using WinSock with OpenSSL? I am looking for a simple Visual C++ 2005 or greater code sample that creates and opens a winsock connection and applies the necessary SSL settings using OpenSSL and frees all resources appropriately. ...

Doubt regarding Winsock Kernel Buffer and Nagle algorithm.

While reading this article, I got a doubt. I understood that while trasferring small data, Nagle algorithm is enabled by default which coalesces small packets. This results in caching some data before transmission. I believe that Winsock Kernel Buffer is the place where caching happens. Correct me if I am wrong. Does it mean that if t...

Bind to any port available

I need an app that sends an UDP packet to some network server and receives the response. The server replies to the same port number where request came from, so I first need to bind() my socket to any UDP port number. Hardcoding the UDP port number is a bad idea, as it might be used by any other application running on the same PC. Is th...

most efficient winsock design for high load network application

Hello, I know it is a general question but I need your recommodations about a TCP server/client application. The server is only supposed to handle one connection at a time. Server is sending live images (one frame is approx. 50K and 20 frames per second) to connected client. Actually at the startup of the server and client applicatio...

Boost Asio dll raising ws2_32.dll error on Windows 2000

I have a dll that uses boost Asio for networking. When I link this dll to an application running on Windows 2000, a runtime exception is thrown: "The procedure entry point freeaddrinfo could not be located in the dynamic link library WS2_32.dll" Microsoft provides a workaround at http://msdn.microsoft.com/en-us/library/ms737931(VS.85)....

Recomended in-depth winsock literature?

Most winsock tutorials on the net are preety much basic, and become useless once you got some more serious questions as to the internals of the system. MSDN is somewhat more inshightful, but tends to be preety minimalistic and sometimes ambigious. Can you recommend some good reading materials, books or articles, that really cover the su...

Getting local IP address in Delphi

Possible Duplicate: Delphi, How to get all local IPs? What's the easiest & quickest method for obtaining a local IP address of the machine in Delphi 2009 without using 3rd-party components? Thanks. ...

How do I change a process's socket connection

A process is connecting to a certain ip or domain, but I do not know what it is. The process can't connect to the server. How do I find and change it? ...

IO completion port key confusion

I'm writing an IO completion port based server (source code here) using the Windows DLL API in Python using the ctypes module. But this is a pretty direct usage of the API and this question is directed at those who have a knowledge of IOCP, not Python. As I understand the documentation for CreateIoCompletionPort, you specify your "user...

How can I make a network connection with Visual Basic from Microsoft Access?

We have a Visual Basic application inside of Microsoft Access and we need to make a network connection. With VB6, there was a handy little control called WinSock that made this possible, but I can't find anything similar for the stripped down VB version that exists inside of Microsoft Access. Any ideas? Since I'm not getting any answers...

How to get a Win32 Thread to wait on a work queue and a socket?

I need a client networking thread to be able to respond both to new messages to be transmitted, and the receipt of new data on the network. I wish to avoid this thread performing a polling loop, but rather to process only as needed. The scenario is as follows: A client application needs to communicate to a server via a protocol that is...

perform connect() on specific network adapter

Hello! I'm programming with Winsock2. I have two network adapters in system, one for local connections (LAN), one for outer connections (PPPOE). When I perform a connect() call to connect to local address, it uses PPPOE adapter instead of LAN. I know I could tweak this using metrics, but can't I just use some hard-code to forcibly use L...

Why did Microsoft implement sockets differently?

I'm currently in the middle of a project involving sockets, and I just use Linux's sys/socket.h file. Cue the port to Microsoft, and realizing that Winsock is different. I guess I have two questions. First, what're the main differences between the two implementations? Is there an easy way to "translate" them? A link to a guide would be ...

How do I check the destination that a socket is connected to?

If,for example,The socket in my compiled application is designed to connect to 123.456.789.0. How do I check if its connected to 123.456.789.0? Is there a way to do this? The idea is this:I want to prevent other people editing my program and changing the address to,for example, 127.0.0.1 and make it connect through a proxy. Is there a...

GetHostByAddr() win32

Hi All, I am giving an IP Address : 64.78.58.91 and i would like to retrieve the hostname using GetHostByAddr() win32 API. Instead of returning www.ripcode.com it returns intermedia.net I would expect to get www.ripcode.com Can you suggest a Different API which could solve this problem. Thanks in Advance Best Regards, Suren ...

winsock socket error

followin error in vb6 code: 1) Error(10022) Socket not bound, invalid address or listen is not invoked prior to accept 2) Error 10048 - Address in Use ...

Windows DNS hooks

How does Windows resolv DNS and how can I intercept the calls, in order to inject my own domains? I need this in an application, and running my own DNS server or modifying the hosts file is not a solution. ...

How to use Winsock 2?

How do I use Windows Sockets 2 in Visual Studio 2008. I'm using precompiled headers, so far what I have tried is: Included winsock2.h in my StdAfx.h file and entered WS2_32.LIB as an additional dependency in Project Settings I get these errors ------ Build started: Project: TestIVR, Configuration: Debug Win32 ------ Compiling... mai...