Ger
Feb 2nd, 2001, 02:31 PM
On this moment I am trying to construct a client/server chat.
(Part of) The following code resides on the server:
If strCommand$ = "[JOIN]" Then
Call sckConnect(Index).SendData("[OPERATOR] " & txtNick.Text)
DoEvents
For lngIndex& = 1 To sckConnect().Count - 1
If sckConnect(lngIndex&).State = sckConnected Then
Call sckConnect(lngIndex&).SendData("[USERLIST] " & strBuf1$)
endif
DoEvents
Next lngIndex&
For lngIndex& = 1 To sckConnect().Count - 1
If sckConnect(lngIndex&).State = sckConnected Then
Call sckConnect(lngIndex&).SendData("[SYSMSG] " & "*** " & strArgument$ & " has joined the chat.")
End If
DoEvents
Next lngIndex&
End If
On the client-site I receive:
[OPERATOR] and so on and that is OK.
Than I receive on the client-site:
[USERLIST]XXXXX[SYSMSG]XXXXXXX
So the second "senddata" bind the two strings (which should be send separately) to one ????
Can someone help me ??
(Part of) The following code resides on the server:
If strCommand$ = "[JOIN]" Then
Call sckConnect(Index).SendData("[OPERATOR] " & txtNick.Text)
DoEvents
For lngIndex& = 1 To sckConnect().Count - 1
If sckConnect(lngIndex&).State = sckConnected Then
Call sckConnect(lngIndex&).SendData("[USERLIST] " & strBuf1$)
endif
DoEvents
Next lngIndex&
For lngIndex& = 1 To sckConnect().Count - 1
If sckConnect(lngIndex&).State = sckConnected Then
Call sckConnect(lngIndex&).SendData("[SYSMSG] " & "*** " & strArgument$ & " has joined the chat.")
End If
DoEvents
Next lngIndex&
End If
On the client-site I receive:
[OPERATOR] and so on and that is OK.
Than I receive on the client-site:
[USERLIST]XXXXX[SYSMSG]XXXXXXX
So the second "senddata" bind the two strings (which should be send separately) to one ????
Can someone help me ??