Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
lnet - TCP server-client problem under linux
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
Using Lazarus to teach In...
by
Nimbus
[
Today
at 10:15:31 pm]
IDE Editor Windows, ident...
by
d7_2_laz
[
Today
at 10:04:35 pm]
Little bit...
by
ASerge
[
Today
at 09:51:32 pm]
CORE-MATH 32bits in Pasca...
by
schuler
[
Today
at 09:32:39 pm]
Lazarus forum incompatibl...
by
Thausand
[
Today
at 07:16:18 pm]
Fpcupdeluxe
by
Thaddy
[
Today
at 06:12:30 pm]
FPC 3.2.4-rc1 available
by
Thaddy
[
Today
at 06:09:54 pm]
FPC Unleashed (inline var...
by
Fibonacci
[
Today
at 03:55:47 pm]
504 Gateway Timeout
by
Martin_fr
[
Today
at 03:28:06 pm]
Problem with MariaDB and ...
by
OH1KH
[
Today
at 03:26:54 pm]
Feature announcement: Fun...
by
Thaddy
[
Today
at 01:47:33 pm]
Elite Arcade
by
nomorelogic
[
Today
at 01:16:40 pm]
IDE Coolbar
by
staratel20
[
Today
at 01:00:32 pm]
Midi to Wav Converter
by
Thaddy
[
Today
at 12:28:47 pm]
Pure Pascal ZPAQ and ZSTD
by
Tomxe
[
Today
at 11:48:23 am]
AmigaOS can't run program...
by
Trenatos
[
Today
at 11:30:22 am]
Lazarus and FreePascal on...
by
jwdietrich
[
Today
at 10:44:37 am]
Space Duel
by
Tomi
[
Today
at 09:18:22 am]
Call the Llama.cpp dynami...
by
LeP
[
Today
at 09:11:38 am]
Is there a "known good" c...
by
Thaddy
[
Today
at 08:07:46 am]
Can I get the position an...
by
CM630
[
Today
at 07:29:22 am]
Lazarus 4.6 on macOS 10.1...
by
wpostma
[
Today
at 03:30:20 am]
Forums were down, and are...
by
wpostma
[
Today
at 03:26:20 am]
Untitled raycaster game (...
by
flowCRANE
[
Today
at 01:17:56 am]
Change original package o...
by
pmralbuquerque
[April 19, 2026, 07:55:14 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: lnet - TCP server-client problem under linux (Read 6823 times)
dfeher
New Member
Posts: 19
lnet - TCP server-client problem under linux
«
on:
August 28, 2010, 09:50:16 am »
Hello!
I've ran into a problem using lNet TCP connection. I have a server and a client connected via TCP protocol. Under ubuntu 10.04 i386 the server senses when the client connects through OnConnect action but when the client disconnects nothing happens although the OnDisconnect event is also used... I've tried the same programs under windows XP and there were no such problems; the server sensed when the client disconnected and vice versa. Everything is written according to the example programs...
I don't know if it's a linux or ubuntu specialty or an lNet bug.
Logged
JohnvdWaeter
Full Member
Posts: 185
Re: lnet - TCP server-client problem under linux
«
Reply #1 on:
August 28, 2010, 11:03:56 am »
Hi,
AFAIK you MUST have an OnReceive-event and you MUST read data here, although there may be nothing to read. Only then other events are fired. Again: AFAIK.
John
Logged
Almindor
Sr. Member
Posts: 412
Re: lnet - TCP server-client problem under linux
«
Reply #2 on:
August 28, 2010, 11:49:56 am »
Exactly as John says, you MUST have OnReceive and do a .Get or .GetMessage inside when called. This is because lNet has NO internal buffers and disconnects (from the other side) are reported by the kernel via recv() calls which give 0 result.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
lnet - TCP server-client problem under linux
TinyPortal
© 2005-2018