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