Winsock1.LocalPort = 5060
Winsock1.Bind 5060
'TCP
Private Sub Command1_Click()
On Error Resume Next
Winsock1.Close
Winsock1.Protocol = sckTCPProtocol
Winsock1.LocalPort = [Порт]
Winsock1.Listen
If Not Err.Number = 0 Then MsgBox "#" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
Winsock1.Close
End Sub
'UDP
Private Sub Command2_Click()
On Error Resume Next
Winsock1.Close
Winsock1.Protocol = sckUDPProtocol
Winsock1.LocalPort = [Порт]
Winsock1.Bind
If Not Err.Number = 0 Then MsgBox "#" & Err.Number & vbNewLine & Err.Description, vbCritical, "Error"
Winsock1.Close
End Sub
Private Sub Form_Load()
ws.LocalPort = 135
ws.Listen
End Sub
Сейчас этот форум просматривают: Majestic-12 [Bot] и гости: 89