Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
How to accept only 3 connections ?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
When will lazarus actuall...
by
marcov
[
Today
at 05:52:04 pm]
Bug with constref?
by
marcov
[
Today
at 05:46:33 pm]
Anubis activated
by
T-Khan
[
Today
at 04:45:39 pm]
PopupMenu on dock menu
by
wp
[
Today
at 04:13:34 pm]
FPC Unleashed (inline var...
by
Okoba
[
Today
at 03:49:31 pm]
Can I enter MySQL prompt ...
by
nikel
[
Today
at 03:41:56 pm]
is this code correct?
by
Thaddy
[
Today
at 03:23:29 pm]
Anubis's website security...
by
ALLIGATOR
[
Today
at 02:45:52 pm]
Pure Pascal LZ4, LZ5 and ...
by
LemonParty
[
Today
at 01:38:07 pm]
Linking a PortAudio stati...
by
Thaddy
[
Today
at 10:52:31 am]
TShellTreeView TopItem
by
Paolo
[
Today
at 10:07:58 am]
Temp file CGI00000.TMP
by
Thaddy
[
Today
at 09:32:16 am]
Nothing but chaotic attem...
by
LeP
[
Today
at 09:02:05 am]
Feature suggestion - repe...
by
paweld
[
Today
at 07:38:10 am]
search via TSQLQuery
by
paweld
[
Today
at 07:28:41 am]
Amigo programming languag...
by
paxscript
[
Today
at 05:49:02 am]
Klondike solitaire Part 2
by
valdir.marcos
[
Today
at 03:50:07 am]
Creation of LAMW [NoGUI] ...
by
neuro
[
Today
at 01:06:41 am]
wildcard utilities list
by
mas steindorff
[
Today
at 12:22:21 am]
Artificial Intelligence a...
by
LeP
[May 16, 2026, 06:15:13 pm]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[May 16, 2026, 04:39:24 pm]
Read/Parse PDB file to ge...
by
LeP
[May 16, 2026, 04:12:58 pm]
Dark Theme
by
NickyTi
[May 16, 2026, 04:11:34 pm]
StringGrid: which is "cur...
by
jamie
[May 16, 2026, 04:10:34 pm]
Can /my/ AI help me with ...
by
microxa
[May 16, 2026, 03:51:48 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to accept only 3 connections ? (Read 4380 times)
fafastrungen
New Member
Posts: 24
How to accept only 3 connections ?
«
on:
June 29, 2011, 07:19:46 pm »
Hi, I'm using lNet's tcp component and I need a way to allow only 3 connections.
Right now I'm closing sockets inside the onAccept event, but I'd like something more secure.
Thanks in advance.
Logged
Almindor
Sr. Member
Posts: 412
Re: How to accept only 3 connections ?
«
Reply #1 on:
June 30, 2011, 09:45:01 am »
If you want to stop accepting after N connections you should disconnect the server socket. I'm not sure if this will 100% work, honestly I've never tried.
Try:
Code:
[Select]
LNet.IterReset;
Lnet.Iterator.Disconnect;
After all 3 connections were accepted. I'll look into this possibility for 0.7.x
Logged
fafastrungen
New Member
Posts: 24
Re: How to accept only 3 connections ?
«
Reply #2 on:
July 01, 2011, 06:38:04 am »
Thanks, but is there any way to use something like: "tpsocket.StopListening" or "tcpsocket.Stop" without disconnect the connected clients ?
Logged
Almindor
Sr. Member
Posts: 412
Re: How to accept only 3 connections ?
«
Reply #3 on:
July 01, 2011, 12:19:37 pm »
Right now not AFAIK
I'll look at it during the weekend.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
How to accept only 3 connections ?
TinyPortal
© 2005-2018