Difference between revisions of "Unit Sockets"
From Ultibo.org
Line 648: | Line 648: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function fpsocketpair(d:cint; xtype:cint; protocol:cint; sv:pcint):cint;</pre> | <pre style="border: 0; padding-bottom:0px;">function fpsocketpair(d:cint; xtype:cint; protocol:cint; sv:pcint):cint;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''RTL File/Text sockets functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function fpRead(Handle:LongInt; var BufPtr; Size:DWORD):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function fpWrite(Handle:LongInt; var BufPtr; Size:DWORD):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure OpenSock(var F:Text);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure IOSock(var F:Text);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure FlushSock(var F:Text);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure CloseSock(var F:text);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure Sock2Text(Sock:Longint; Var SockIn,SockOut:Text);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set up two Pascal Text file descriptors for reading and writing</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function DoAccept(Sock:longint; var addr:TInetSockAddr):longint;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function Accept(Sock:longint; var addr:TInetSockAddr; var SockIn,SockOut:File):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function Accept(Sock:longint; var addr:TInetSockAddr; var SockIn,SockOut:text):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function DoConnect(Sock:longint; const addr:TInetSockAddr):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function Connect(Sock:longint; const addr:TInetSockAddr; var SockIn,SockOut:text):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function Connect(Sock:longint; const addr:TInetSockAddr; var SockIn,SockOut:file):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure Sock2File(Sock:Longint; Var SockIn,SockOut:File);</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
Revision as of 04:46, 2 September 2016
Return to Unit Reference
Contents
[hide]Description
This unit includes the interface normally provided by the sockets unit in the FPC package rtl-extras. The rtl-extras package does not build the sockets unit for target Ultibo as this unit will always be available to provide the required functionality for any other package that uses it.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
Sockets functions
[Expand]
function Send(Sock:Longint; const Buf; BufLen,Flags:Longint):Longint;
Description: To be documented
[Expand]
function SendTo(Sock:Longint; const Buf; BufLen,Flags:Longint; var Addr; AddrLen : Longint):Longint;
Description: To be documented
[Expand]
function Recv(Sock:Longint; var Buf; BufLen,Flags:Longint):Longint;
Description: To be documented
[Expand]
function RecvFrom(Sock : Longint; var Buf; Buflen,Flags : Longint; var Addr; var AddrLen : longint) : longint;
Description: To be documented
[Expand]
function Connect(Sock:Longint; const Addr; Addrlen:Longint):Boolean;
Description: To be documented
[Expand]
function Bind(Sock:Longint; const Addr; AddrLen:Longint):Boolean;
Description: To be documented
[Expand]
function Accept(Sock:Longint; var Addr; var Addrlen:Longint):Longint;
Description: To be documented
[Expand]
function GetSocketName(Sock:Longint; var Addr; var Addrlen:Longint):Longint;
Description: To be documented
[Expand]
function GetPeerName(Sock:Longint; var Addr; var Addrlen:Longint):Longint;
Description: To be documented
[Expand]
function GetSocketOptions(Sock,Level,OptName:Longint; var OptVal; var optlen:longint):Longint;
Description: To be documented
[Expand]
function SetSocketOptions(Sock,Level,OptName:Longint; const OptVal; optlen:longint):Longint;
Description: To be documented
[Expand]
function SocketPair(Domain,SocketType,Protocol:Longint; var Pair:TSockArray):Longint;
Description: To be documented
[Expand]
function Inet_Pton(family: Longint; Source: PChar; Dest: Pointer): Longint;
Description: To be documented
[Expand]
function Inet_Ntop(family: Longint; Source: Pointer; Dest: PChar; Size: Longint): PChar;
Description: To be documented
[Expand]
function GetHostByAddr(addr: Pointer; len, family: Longint): PHostEnt;
Description: To be documented
[Expand]
function GetNetByAddr(addr: Pointer; len, Struct: Integer): PNetEnt;
Description: To be documented
[Expand]
function GetServByPort(port: Longint; proto: PChar): PServEnt;
Description: To be documented
[Expand]
function GetAddrInfo(HostName, ServName: PChar; Hints: PAddrInfo; var Addr: PAddrInfo): Longint;
Description: To be documented
[Expand]
function GetNameInfo(sa: PSockAddr; salen: Longint; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Longint): Longint;
Description: To be documented
RTL sockets functions
[Expand]
function fpsocket(domain:cint; xtype:cint; protocol: cint):cint;
Description: To be documented
[Expand]
function fpsend(s:cint; msg:pointer; len:size_t; flags:cint):ssize_t;
Description: To be documented
[Expand]
function fpsendto(s:cint; msg:pointer; len:size_t; flags:cint; tox :psockaddr; tolen: tsocklen):ssize_t;
Description: To be documented
[Expand]
function fprecv(s:cint; buf: pointer; len: size_t; flags: cint):ssize_t;
Description: To be documented
[Expand]
function fprecvfrom(s:cint; buf: pointer; len: size_t; flags: cint; from : psockaddr; fromlen : psocklen):ssize_t;
Description: To be documented
[Expand]
function fpconnect(s:cint; name : psockaddr; namelen : tsocklen):cint;
Description: To be documented
[Expand]
function fpbind(s:cint; addrx : psockaddr; addrlen : tsocklen):cint;
Description: To be documented
[Expand]
function fpaccept(s:cint; addrx : psockaddr; addrlen : psocklen):cint;
Description: To be documented
[Expand]
function fpgetsockname(s:cint; name : psockaddr; namelen : psocklen):cint;
Description: To be documented
[Expand]
function fpgetpeername(s:cint; name : psockaddr; namelen : psocklen):cint;
Description: To be documented
[Expand]
function fpgetsockopt(s:cint; level:cint; optname:cint; optval:pointer; optlen : psocklen):cint;
Description: To be documented
[Expand]
function fpsetsockopt(s:cint; level:cint; optname:cint; optval:pointer; optlen :tsocklen):cint;
Description: To be documented
[Expand]
function fpsocketpair(d:cint; xtype:cint; protocol:cint; sv:pcint):cint;
Description: To be documented
RTL File/Text sockets functions
[Expand]
function fpRead(Handle:LongInt; var BufPtr; Size:DWORD):DWORD;
Description: To be documented
[Expand]
function fpWrite(Handle:LongInt; var BufPtr; Size:DWORD):DWORD;
Description: To be documented
[Expand]
procedure Sock2Text(Sock:Longint; Var SockIn,SockOut:Text);
Description: Set up two Pascal Text file descriptors for reading and writing
[Expand]
function DoAccept(Sock:longint; var addr:TInetSockAddr):longint;
Description: To be documented
[Expand]
function Accept(Sock:longint; var addr:TInetSockAddr; var SockIn,SockOut:File):Boolean;
Description: To be documented
[Expand]
function Accept(Sock:longint; var addr:TInetSockAddr; var SockIn,SockOut:text):Boolean;
Description: To be documented
[Expand]
function DoConnect(Sock:longint; const addr:TInetSockAddr):Boolean;
Description: To be documented
[Expand]
function Connect(Sock:longint; const addr:TInetSockAddr; var SockIn,SockOut:text):Boolean;
Description: To be documented
[Expand]
function Connect(Sock:longint; const addr:TInetSockAddr; var SockIn,SockOut:file):Boolean;
Description: To be documented
Return to Unit Reference