Private Sub WskServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
用VB利用WINSOCK编程请解释这段话~~
参考答案:Dim RecBuffer As String
Dim Ret As Integer
'错误语句,如果出错,跳转倒 GLOCAL标签
On Error GoTo GLocal
'调用WskServer(Index)的GetData方法,取数据放在RecBuffer变量中
WskServer(Index).GetData RecBuffer
'查看取出来的数据左边8个字符
Select Case Left(RecBuffer, 8)
'如果是"Msg_Eof_"
Case "Msg_Eof_"
'则关闭文件FL
Close #FL
lblInfo.Caption = "文件接收..."
'如果是"Msg_Dst_"
Case "Msg_Dst_"
'取出路径(除了前面8个以外的其它部分)
DstPath = Right(RecBuffer, Len(RecBuffer) - 8)
'找一个空闲的文件号,存入变量FL
FL = FreeFile
'overwrite file