help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes] Reference for unit 'lNet' (#LNet)

TLTcp.GetMessage

Receive a message from the other side

Declaration

Source position: lnet.pp line 390

public function TLTcp.GetMessage(

  out msg: String;

  aSocket: TLSocket = nil

):Integer; override;

Arguments

msg

  

The user message to receive into

aSocket

  

Function result

Returns the number of bytes received

Description

This method is used to receive a message to the other side and input it into a user string.
If the socket argument is not specified:
1. If the object is a client (connect was used), then it uses the only socket, and so the argument is useless anyhow.
2. If the object is a server, the current iterator is used. This points to the first accepted connection socket if there is one, or the server socket (in which case Get will fail with 0 and OnError will get called).

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505