Well, I would ask on the Indy newsgroups as I don't rightfully know. How are you going to build your list of refused IP's? How do you determine that that IP should be refused? Is it better to keep a list of ALLOWED IPs?
I think it could be something as simple as AThread.Connection.Disconnect; --- Rich Cooper <[EMAIL PROTECTED]> wrote: > 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 -> Delphi@elists.org > http://www.elists.org/mailman/listinfo/delphi > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Delphi mailing list -> Delphi@elists.org http://www.elists.org/mailman/listinfo/delphi