[Overview][Constants][Types][Procedures and functions][Variables] |
Create new socket
Source position: socketsh.inc line 175
function Socket( |
Domain: LongInt; |
SocketType: LongInt; |
Protocol: LongInt |
):LongInt; |
Socketcreates a new socket in domain Domain, from type SocketTypeusing protocol Protocol. The Domain, Socket type and Protocol can be specified using predefined constants (see the section on constants for available constants) If succesfull, the function returns a socket descriptor, which can be passed to a subsequent Bindcall. If unsuccesfull, the function returns -1.
for an example, see Accept.
Errors are returned in SocketError, and include the follwing:
|
Create socket pair |