winsock2

Increase the TCP receive window for a specific socket

Hi, How to increase the TCP receive window for a specific socket? - I know how to do so for all the sockets by setting the registry key TcpWindowSize, but how do do that for a specific one? According to MSFT's documents, the way is Calling the Windows Sockets function setsockopt, which sets the receive window on a per-socket ...

Bluetooth service problem

hi I need to create a custom bluetooth service and I have to develop it using c++. I read a lot of examples but I didn't success in publishing a new service with a custom UUID. I need to specify a UUID in order to be able to connect to the service from an android app. This is what i wrote: GUID service_UUID = { /* 00000003-0000-1000-80...

get bluetooth paired devices

hi I would like to scan paired bluetooth devices to look for services before perform a discovery of new devices.. There's a way to get paired bluetooth devices with winsock? Could you provide me a sample? Thanks! ...

How to do packet mangling with winsock2 in windows?

I'm following examples here, but none of them provides an example on how to modify packets(previously I used winpcap only to found that it can ONLY read packets!). Can someone give me some clue even which function can actually modify incoming/outgoing packets?? ...

Winsock Select() function gives 0xC00000FD exception

Hello, I've a select based server. Sockets are in blocking mode,but for select() function I'm using 250 ms. timeout. Basically my server accepts only one client and sending data to that client. It is working for weeks without problem if I just send data from server to client. But I realized that if client sends data to server after 3-4...

winsock compile error

The following errors are from a file with just windows and winsock2 included. C:\Users\ioil\Desktop\dm\bin>dmc sockit.c typedef struct fd_set { ^ C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(85) : Error: 'fd_set' is already defined } fd_set; ^ C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(88)...

C++ Winsock 2 questions

I have read through the documentation for Winsock2 on MSDN, but I still need clarification on a few things, if anyone can help. I planned to make something like the the setup you get when you use WSAAsyncSelect(), but using a separate thread. Can I use WSAEventSelect() to link more than one socket to a single event object? If I used a ...

Is MFC supports winsock2?

Hi all, I'm a fresher to Visual Studio. I read some where MFC supports only winsock1. Is it true that MFC doesnt support winsock2? ...

How to write TransmitPackets function in winsock2 ?

Hi all, I'm writing a file transfer application in VC++(Server) using UDP. I came to know in winsock2, there are some functions which are useful in file transfer. Can anybody help me. I'm also looking for a sample application of TransmitPackets of winsock2 but not gettng. Please help me. Thank you. ...

what is the best strategy to build file transfer application?

Hi all, I'm working on a UDP File(large) transfer application. Client end is Adobe Flash builder and also in VC++ and Server end is C++. I'm sending my file in packets and resending the missing packets.Finally it is taking the time what ever TCP. I'm using winsock2 at server end but not complete functions.Is there any better protocols o...

MFC winsock1 and 2

Hi all, I'm deep in trouble with my project. I have to link two radar with my program, but the first has its own library that uses winsock, while in the second I want to use winsock2. How can i do that? At the moment i get many redefinition errors from the includes within winsock.h and winsock2.h. Take into account that the first ra...

WSAEAFNOSUPPORT error

Hi I am implementing P2P chatting application where server will mediator for exchangeing IP and port to connecting peer. I am getting WSAEAFNOSUPPORT 10047 error . I have created UDP socket sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP ); then iam binding it to local ip and port. if (bind(sockfd,(struct sockaddr *)&localaddr,size...

Performance difference between select() vs WSAEventSelect() vs WSAWaitForMultipleEvents()

I have an application that is using a cross platform library developed internally. For various reasons I must stick with using this library under windows at least. That library contains a socket class that I have to use and it's calling select. I have the ability to modify the library a little. Would there be a performance improvement ...

missing messages when reading with non-blocking udp

I have problem with missing messages when using nonblocking read in udp between two hosts. The sender is on linux and the reader is on winxp. This example in python shows the problem. Here are three scripts used to show the problem. send.py: import socket, sys s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) host = sys.argv[1] s.send...

client / server program in c++ problem

Hi all, I have created a client and server program in c++ based i=on windows sockets. I have some problem that when i execute the program no message appears on the server end and after that the program exits.Data is sending to server but it is not responding back. i am pasting my code below ****Server code ===========**** #ifndef WIN3...

Changing http traffic by using LSP problem?

Hello! I try change and add some data to http traffic by using LSP. To do that i use LSP sample from Windows PlatformSDK and change lpBuffers variable in function WSPRecv in spi.cpp. When i only replace data in lpBuffers than all work fine. But when i try add data to lpBuffers than lpBuffers is change, but real traffic not changing. Anyb...