2
$Id: sockets.pp,v 1.9 2004/03/16 18:03:37 marco Exp $
3
This file is part of the Free Pascal run time library.
4
Copyright (c) 1999-2000 by the Free Pascal development team
6
See the file COPYING.FPC, included in this distribution,
7
for details about the copyright.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
**********************************************************************}
22
{$DEFINE FPC_NEW_SOCKETS_UNIT}
24
{ define maybelibc:=cdecl;external;} // in future. Have to wrap now
25
{$endif} // because of !@$!@#% socketerror
33
TUnixSockAddr = packed Record
34
{$ifdef SOCK_HAS_SINLEN}
38
path:array[0..107] of char; //104 total for freebsd.
42
{ unix socket specific functions }
43
Procedure Str2UnixSockAddr(const addr:string;var t:TUnixSockAddr;var len:longint);
44
Function Bind(Sock:longint;const addr:string):boolean;
45
Function Connect(Sock:longint;const addr:string;var SockIn,SockOut:text):Boolean;
46
Function Connect(Sock:longint;const addr:string;var SockIn,SockOut:file):Boolean;
47
Function Accept(Sock:longint;var addr:string;var SockIn,SockOut:text):Boolean;
48
Function Accept(Sock:longint;var addr:string;var SockIn,SockOut:File):Boolean;
50
//function fpaccept (s:cint; addrx : psockaddr; addrlen : psocklen):cint; maybelibc
51
//function fpbind (s:cint; addrx : psockaddr; addrlen : tsocklen):cint; maybelibc
52
//function fpconnect (s:cint; name : psockaddr; namelen : tsocklen):cint; maybelibc
56
Uses BaseUnix,{$ifndef FPC_USE_LIBC}SysCall{$else}initc{$endif};
58
{ Include filerec and textrec structures }
61
{******************************************************************************
62
Kernel Socket Callings
63
******************************************************************************}
65
{$ifndef FPC_USE_LIBC}
77
Revision 1.9 2004/03/16 18:03:37 marco
78
* first changes sockets units
80
Revision 1.8 2003/11/25 15:13:28 marco
81
* somebody added fields to socketsh.inc that were already under ifdef bsd
83
Revision 1.7 2003/09/14 20:15:01 marco
84
* Unix reform stage two. Remove all calls from Unix that exist in Baseunix.
86
Revision 1.6 2002/09/07 16:01:27 peter
87
* old logs removed and tabs fixed