Message board for the users of flat assembler.
> Windows > sockets question
I'm coding socks proxy server and I need to recv on 2 ports, and send to other dest when data arrives. What is best way to do this? Is there way to have function called when data arrives on socket, so I can recv and send to other dest?
|04 Dec 2008, 04:22||
Use the WSAAsyncSelect function (on WSOCK32.INC)
It's usefull to recive a message on a window when socket events occur,
for example when a connection is closed or when you recive some packets (data).
The parameters are:
1) the Socket
2) The handle of the windows (for example a DialogBox)
3) A message to be receved when the evet occurs (dword)
4) the events
Example: invoke WSAAsyncSelect,[socket],[handle],100h,FD_READ
for more details search with GOOGLE: WSAAsyncSelect Function()
You can find and download my network tool (source code) that work like a server, chat and like a remote executor, here (scroll down the page):
|04 Dec 2008, 12:38||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.