Add 'Home'

John Bintz 2023-04-10 21:11:17 +00:00
commit fba3fb5355
1 changed files with 24 additions and 0 deletions

24
Home.md Normal file

@ -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
```