Agilent Technologies E5071C Podręcznik Użytkownika Strona 191

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 551
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 190
Chapter 12 191
Sample Application Programs
Controlling Using Telnet Server
12. Sample Application
Programs
Disconnection
The procedure corresponding to Disconnection is CloseConnection (Example 12-12).
CloseConnection disconnects communication and removes a socket using closesocket
function of
WinSock API. closesocket function takes a parameter for a socket
descriptor (input).
Example 12-12 CloseConnection
Sub CloseConnection()
x = closesocket(socketId)
If x = SOCKET_ERROR Then
MsgBox ("ERROR: closesocket = " + Str$(x))
Exit Sub
End If
End Sub
End
The procedure corresponding to End is EndIt (Example 12-13). EndIt disconnects
WinSock API using WSACleanup function of WinSock API. The function
WSACleanup should be always used when terminating WinSock.
Example 12-13 EndIt
Sub EndIt()
'Shutdown Winsock DLL
x = WSACleanup()
End Sub
Przeglądanie stron 190
1 2 ... 186 187 188 189 190 191 192 193 194 195 196 ... 550 551

Komentarze do niniejszej Instrukcji

Vikiehs 04 Jan 2024 | 13:20:06

urenrjrjkvnm