Difference between revisions of "TWSocket"

From Overbyte
Jump to navigation Jump to search
Line 20: Line 20:
 
| valign="top" | [[TWSocket.ComponentOptions | ComponentOptions]] ||||
 
| valign="top" | [[TWSocket.ComponentOptions | ComponentOptions]] ||||
 
|-
 
|-
| valign="top" | [[TWSocket.DnsResult | DnsResult]] |||| Typically called in [[OnDnsLookupDone]]. The IP address of the host given as argument to [[DnsLookup]].
+
| valign="top" | [[TWSocket.DnsResult | DnsResult]] |||| Typically called in [[OnDnsLookupDone]]. The IP address of the remote host given as argument to [[DnsLookup]].
 
|-
 
|-
 
| valign="top" | [[TWSocket.DnsResultList | DnsResultList]] |||| Similar to [[DnsResult]] but a TStringList containing the multiple IP's of the host if appropriate.
 
| valign="top" | [[TWSocket.DnsResultList | DnsResultList]] |||| Similar to [[DnsResult]] but a TStringList containing the multiple IP's of the host if appropriate.
Line 38: Line 38:
 
| valign="top" | [[TWSocket.LineEdit | LineEdit]] |||| Handle received control characters used for editing.
 
| valign="top" | [[TWSocket.LineEdit | LineEdit]] |||| Handle received control characters used for editing.
 
|-
 
|-
| valign="top" | [[TWSocket.LineEnd | LineEnd]] |||| End of line character(s) used ot fire [[OnDataAvailable]].
+
| valign="top" | [[TWSocket.LineEnd | LineEnd]] |||| End of line character(s) used ot trigger [[OnDataAvailable]].
 
|-
 
|-
 
| valign="top" | [[TWSocket.LineLength | LineLength]] ||||
 
| valign="top" | [[TWSocket.LineLength | LineLength]] ||||
 
|-
 
|-
| valign="top" | [[TWSocket.LineLimit | LineLimit]] |||| Maximum line lenght to receive before firing [[OnLineLimitExceeded]]. See also [[DOS attac]].
+
| valign="top" | [[TWSocket.LineLimit | LineLimit]] |||| Maximum line lenght to receive before triggering [[OnLineLimitExceeded]]. See also [[DOS attac]].
 
|-
 
|-
| valign="top" | [[TWSocket.LineMode | LineMode]] ||||
+
| valign="top" | [[TWSocket.LineMode | LineMode]] |||| Use [[LineEnd]] as end of line marker to trigger [[OnDataAvailable]].
 
|-
 
|-
 
| valign="top" | [[TWSocket.LingerOnOff | LingerOnOff]] ||||
 
| valign="top" | [[TWSocket.LingerOnOff | LingerOnOff]] ||||
Line 52: Line 52:
 
| valign="top" | [[TWSocket.ListenBacklog | ListenBacklog]] ||||
 
| valign="top" | [[TWSocket.ListenBacklog | ListenBacklog]] ||||
 
|-
 
|-
| valign="top" | [[TWSocket.LocalAddr | LocalAddr]] ||||
+
| valign="top" | [[TWSocket.LocalAddr | LocalAddr]] |||| The local IP address of the session.
 
|-
 
|-
| valign="top" | [[TWSocket.LocalPort | LocalPort]] ||||
+
| valign="top" | [[TWSocket.LocalPort | LocalPort]] |||| The local port of the session.
 
|-
 
|-
 
| valign="top" | [[TWSocket.MultiCast | MultiCast]] ||||
 
| valign="top" | [[TWSocket.MultiCast | MultiCast]] ||||
Line 64: Line 64:
 
| valign="top" | [[TWSocket.MultiThreaded | MultiThreaded]] ||||
 
| valign="top" | [[TWSocket.MultiThreaded | MultiThreaded]] ||||
 
|-
 
|-
| valign="top" | [[TWSocket.PeerAddr | PeerAddr]] ||||
+
| valign="top" | [[TWSocket.PeerAddr | PeerAddr]] |||| The remote IP address of the session.
 
|-
 
|-
| valign="top" | [[TWSocket.PeerPort | PeerPort]] ||||
+
| valign="top" | [[TWSocket.PeerPort | PeerPort]] |||| The remote port of the session.
 
|-
 
|-
 
| valign="top" | [[TWSocket.Port | Port]] ||||
 
| valign="top" | [[TWSocket.Port | Port]] ||||

Revision as of 14:18, 25 February 2006

Main page -> ICS component reference -> TWSocket

Overview

  • unit WSocket.pas
  • inheritance

TWSocket component is implementing the TCP protocol described in RFC 793 and and UDP protocol described in RFC 768. Both protocols are encaptulated by the IP protocol described in RFC 791. TWSocket is used in almost every other ICS component.

TWSocket component can be used as client or a server. For its use as TCP server however TWSocketServer is encouraged because of his advanced features.

Properties

Addr Client: The host to connect to. Server: The interface to listen on.
AllSent
BufSize Size in bytes for send dynamic buffer cell.
ComponentOptions
DnsResult Typically called in OnDnsLookupDone. The IP address of the remote host given as argument to DnsLookup.
DnsResultList Similar to DnsResult but a TStringList containing the multiple IP's of the host if appropriate.
FlushTimeout
Handle Handle for the underlaying hidden window.
HSocket Winsock handle for underlaying socket.
IcsLogger
LastError
LineEcho Echo all received characters back to tramitter.
LineEdit Handle received control characters used for editing.
LineEnd End of line character(s) used ot trigger OnDataAvailable.
LineLength
LineLimit Maximum line lenght to receive before triggering OnLineLimitExceeded. See also DOS attac.
LineMode Use LineEnd as end of line marker to trigger OnDataAvailable.
LingerOnOff
LingerTimeout
ListenBacklog
LocalAddr The local IP address of the session.
LocalPort The local port of the session.
MultiCast
MultiCastAddrStr
MultiCastIpTTL
MultiThreaded
PeerAddr The remote IP address of the session.
PeerPort The remote port of the session.
Port
PortNum
Proto
RcvdCnt
RcvdCount
RcvdPtr
ReadCount
ReqVerLow
ReqVerHigh
ReuseAddr
SendFlags
SocksAuthentication
SocksLevel
SocksPassword
SocksPort
SocksServer
SocksUsercode
State
Terminated
Text

Methods

Abort Align test
Accept
CancelDnsLookup
Close
CloseDelayed
Connect
Create
DeleteBufferedData
Destroy
DnsLookup
Dup
Flush
GetPeerAddr
GetPeerName
GetPeerPort
GetSockName
GetXAddr
GetXPort
Listen
MessageLoop
MessagePump
Pause
PeekData
ProcessMessage
ProcessMessages
PutDataInSendBuffer
PutStringInSendBuffer
Receive
ReceiveFrom
ReceiveStr
Release
Resume
ReverseDnsLookup
Send
SendStr
SendTo
SetLingerOption
Shutdown
TimerClear
TimerCmp
TimerIsSet
ThreadAttach
ThreadDetach
WaitForClose Align test

Events

OnBgException Background exception occured.
OnChangeState State of TWSocket has changed.
OnDataAvailable Data available in internal receive buffer.
OnDataSent Internal sent buffer is completely delivered to winsock.
OnDebugDisplay
OnDnsLookupDone DNSLookUp has finished.
OnError Discouraged, use exception handling instead.
OnLineLimitExceeded Denial of service attack
OnMessagePump To call your own message pump.
OnSendData Winsock send buffer is empty, will be filled again by internal send buffer if still data available to send.
OnSessionAvailable Client connected to this server.
OnSessionClosed Socket has closed.
OnSessionConnected Session to host etablished.
OnSocksAuthState
OnSocksConnected
OnSocksError

How to

Title



ICS Components Reference