Add 'Home'
commit
fba3fb5355
|
@ -0,0 +1,24 @@
|
||||||
|
## Gotchas
|
||||||
|
|
||||||
|
### Servers
|
||||||
|
|
||||||
|
* After you Accept a connection from a client, you need to watch the new socket for that client for updates, rather than the original server socket:
|
||||||
|
|
||||||
|
```vb6
|
||||||
|
Do
|
||||||
|
RESULT=Socket Wait Async Reading(SERVER, 500)
|
||||||
|
|
||||||
|
If RESULT > 0
|
||||||
|
_REMOTE_SOCKET=Socket Accept(SERVER)
|
||||||
|
|
||||||
|
' For all communication with this client, use this socket, not the SERVER socket
|
||||||
|
Do
|
||||||
|
RESULT=Socket Wait Async Reading(_REMOTE_SOCKET, 500)
|
||||||
|
If RESULT > 0
|
||||||
|
Print Socket Recv$(_REMOTE_SOCKET, 1024)
|
||||||
|
End If
|
||||||
|
Wait Vbl
|
||||||
|
Loop
|
||||||
|
End If
|
||||||
|
Loop
|
||||||
|
```
|
Loading…
Reference in New Issue