9.0
Table Of Contents
- VMCI Sockets Programming Guide
- Contents
- About This Book
- About VMCI Sockets
- Porting to VMCI Sockets
- Creating Stream VMCI Sockets
- Creating Datagram VMCI Sockets
- Security of the VMCI Device
- Appendix: Learning More About Sockets
- Index
VMware, Inc. 19
4
ThischapterdescribesthedetailsofcreatingVMCIsocketstoreplaceUDPsockets.
“PreparingtheServerforaConnection”onpage 20
“HavingtheClientRequestaConnection”onpage 21
Datagram VMCI Sockets
TheflowchartinFigure 4‐1showshowtoestablishconnectionlesssocketsontheserverandclient.
Figure 4-1. Connectionless Datagram Sockets
InUDPsockets,theserverwaitsfortheclienttotransmit,andacceptsdatagrams.InVMCIsockets,theserver
andclientcommunicatesimilarlywithdatagrams.
Creating Datagram VMCI Sockets
4
socket()
bind()
Server
wait for client datagram
sendto()
recvfrom()
context ID
socket()
Client
sendto()
close() close()
transmit data
reply to data
loop
recvfrom()