Add CloseSocket(SocketID)

This commit is contained in:
René Linder 2020-11-28 13:27:43 +01:00
parent e8f9161fad
commit 4f81308f22

View file

@ -41,7 +41,7 @@ DeclareModule lsocket
Declare WaitSocket(ServerSocket.i) ;Return new SocketID
Declare ReadSocket(ClientSocket.i, *Buffer, Length.i) ;Return Effective Read
Declare WriteSocket(ClientSocket.i, *Buffer, Length.i) ;Return Effective Writen
Declare CloseSocket(Socket.i)
EndDeclareModule
Module lsocket
@ -82,18 +82,22 @@ Module lsocket
ProcedureReturn ClientSID
EndProcedure
Procedure ReadSocket(ClientSocket.i, *Buffer, Length.i) ;Return Effective Read
Procedure ReadSocket(ClientSocket.i, Buffer, Length.i) ;Return Effective Read
Protected Effective.i
Effective = read_(ClientSocket, *Buffer, Length)
Effective = read_(ClientSocket, Buffer, Length)
ProcedureReturn Effective
EndProcedure
Procedure WriteSocket(ClientSocket.i, *Buffer, Length.i) ;Return Effective Writen
Procedure WriteSocket(ClientSocket.i, Buffer, Length.i) ;Return Effective Writen
Protected Effective.i
Effective = write_(ClientSocket, *Buffer, Length)
Effective = write_(ClientSocket, Buffer, Length)
ProcedureReturn Effective
EndProcedure
Procedure CloseSocket(Socket.i)
close_(Socket)
EndProcedure