Introduction

API Winsock

Exemple
Ecrivez-moi

En partenariat avec amazon.fr

LISTEN

 
Mise d'un socket en attente de connection
Declare Function listen Lib "wsock32.dll" _
	(ByVal sock As Long, _
	 ByVal backlog As Integer) As Integer

Paramètres :

sock : identifie le socket à utiliser

backlog : nombre maximal de connections en attente (de 1 à 5)

retour : SOCKET_ERROR en cas d'erreur, 0 sinon.
Public Const SOCKET_ERROR = -1
Exemple :

Dim CR as long
Dim sock as long

CR = listen(sock, 1)
If CR < 0 Then
    MsgBox "Erreur sur listen : " & WSAGetLastError()
End If