Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
red-prig committed Nov 8, 2023
1 parent fea4a0e commit 73e8b0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/ps4_libscehttp.pas
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ implementation
SCE_HTTP_ERROR_OUT_OF_MEMORY=$80431022;
SCE_HTTP_ERROR_INVALID_VALUE=$804311fe;
SCE_HTTP_ERROR_INVALID_URL =$80433060;
SCE_HTTP_ERROR_NETWORK =$80431063;

type
SceHttpUriElement=packed record
Expand Down
26 changes: 13 additions & 13 deletions src/ps4_libscenet.pas
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ interface

implementation

const
SCE_NET_EINVAL =22;
SCE_NET_ENOSPC =28;
SCE_NET_EAFNOSUPPORT=47;

SCE_NET_EHOSTUNREACH=65;


threadvar
sce_net_errno:Integer;

Expand Down Expand Up @@ -103,36 +111,32 @@ function ps4_sceNetTerm:Integer; SysV_ABI_CDecl;

function ps4_sceNetPoolCreate(name:PChar;size,flags:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetPoolCreate:',name,':',size,':',flags);
//Writeln('sceNetPoolCreate:',name,':',size,':',flags);
Result:=2; // iNetLibId
end;

function ps4_sceNetPoolDestroy(memid:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetPoolDestroy:',memid);
//Writeln('sceNetPoolDestroy:',memid);
Result:=0;
end;

function ps4_sceNetResolverCreate(name:PChar;memid,flags:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetResolverCreate:',name,':',memid);
//Writeln('sceNetResolverCreate:',name,':',memid);
Result:=111;
end;

function ps4_sceNetEpollCreate(name:PChar;flags:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetEpollCreate:',name,':',flags);
//Writeln('sceNetEpollCreate:',name,':',flags);
Result:=3;
end;

const
AF_INET = 2;
AF_INET6=28;

SCE_NET_EINVAL =22;
SCE_NET_ENOSPC =28;
SCE_NET_EAFNOSUPPORT=47;

function ps4_sceNetInetPton(af:Integer;
src:Pchar;
dst:Pointer):Integer; SysV_ABI_CDecl;
Expand Down Expand Up @@ -354,11 +358,7 @@ function ps4_sceNetGetsockopt(s:Integer; level:Integer; optname:Integer; optval:

function ps4_sceNetResolverStartAton(rid:Integer; const addr:pSceNetInAddr; hostname:PChar; hostname_len:Integer; timeout:Integer; retry:Integer; flags:Integer):Integer; SysV_ABI_CDecl;
begin
if (hostname<>nil) then
begin
FillChar(hostname^,hostname_len,0);
end;
Result:=0;
Exit(_set_net_errno(SCE_NET_EHOSTUNREACH));
end;

function ps4_sceNetResolverDestroy(rid:Integer):Integer; SysV_ABI_CDecl;
Expand Down

0 comments on commit 73e8b0c

Please sign in to comment.