Eddie Shipman wrote
>> Does anyone know how to redirect these IP addresses to another address
>> using the Indy 9 HTTPServer and D7?
>>
>
> Don't accept connections from them.
There is no hint of how to refuse a connection in the Indy 9 HTTPServer
example code.
The OnConnect and OnDisconnect events (with my time stamp added) are:
procedure TfmHTTPServerMain.HTTPServerConnect(AThread: TIdPeerThread);
var PeerIP : string;
PeerPort : string;
DTStamp : string;
begin
PeerIP := AThread.Connection.Socket.Binding.PeerIP;
PeerPort := IntToStr(AThread.Connection.Socket.Binding.PeerPort);
DTStamp := DateTimeToStr(Now);
DisplayMessage('User logged in '+PeerIP+':'+PeerPort+' at '+DTStamp);
end;
procedure TfmHTTPServerMain.HTTPServerDisconnect(AThread: TIdPeerThread);
var DTStamp : string;
begin
DTStamp := DateTimeToStr(Now);
DisplayMessage('User logged out at '+DTStamp);
end;
Neither of these show how to refuse a connection. Since I have to already
have
a connection in the examples to get an IP address, how could I refuse a
connection based on IP?
There must be a way.
Suggestions greatly appreciated.
Rich
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi