Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)
I started to code a socks5 proxy server with IOCP days ago,and I
encountered a problem.A socks5 proxy server mostly transfers data between
the client and the remote server.
Client <--> Socks Server <--> Remote Server
The problem:
If socks server receives message from client side,and if this I/O
completes,socks server will send the message to the remote server;then the
socks server must issue a new WSARecv() call,but what's the direction to
receive data because there are two situations.
1.If socks server receives the entire message from the client side,it has
to call WSARecv(RemoteServerSocket,.....) to prepare to get data from the
remote server side.
2.If socks server only receives part of the whole message from the client
side,
it has to call WSARecv(ClientSocket,......) to get the rest of the message
form client side.
In short,the problem is how to determine whether we has receives the
entire message from the client side or not.
Is it any way to solve that?
Thanks
I started to code a socks5 proxy server with IOCP days ago,and I
encountered a problem.A socks5 proxy server mostly transfers data between
the client and the remote server.
Client <--> Socks Server <--> Remote Server
The problem:
If socks server receives message from client side,and if this I/O
completes,socks server will send the message to the remote server;then the
socks server must issue a new WSARecv() call,but what's the direction to
receive data because there are two situations.
1.If socks server receives the entire message from the client side,it has
to call WSARecv(RemoteServerSocket,.....) to prepare to get data from the
remote server side.
2.If socks server only receives part of the whole message from the client
side,
it has to call WSARecv(ClientSocket,......) to get the rest of the message
form client side.
In short,the problem is how to determine whether we has receives the
entire message from the client side or not.
Is it any way to solve that?
Thanks