Add CloseSocket(SocketID)
This commit is contained in:
parent
e8f9161fad
commit
4f81308f22
1 changed files with 9 additions and 5 deletions
14
lsocket.pbi
14
lsocket.pbi
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue