Vi t Virtual Environments: l E i t Networking Basics g Anthony - - PowerPoint PPT Presentation
Vi t Virtual Environments: l E i t Networking Basics g Anthony - - PowerPoint PPT Presentation
Vi t Virtual Environments: l E i t Networking Basics g Anthony Steed Anthony Steed Department of Computer Science Department of Computer Science University College London http://www.cs.ucl.ac.uk/teaching/VE Introduction Networks at
Introduction
- Networks at the heart of networked VR
M t k t l t th
- Many network protocols are out there
– TCP, UDP, multicast, RTP, etc C – Choice based on needs
- Programming networking in XVR
2
Network properties
- Latency (Round Trip Time)
Jitt
- Jitter
- Bandwidth (Capacity)
- Loss (Congestion, Reliability)
3
Internet Protocol - IP
Application
FTP SMTP DNS SNMP
Transport
TCP UDP
Internet Protocol Transport
IP ICMP IGMP
Data Link
G ARP/RARP Ethernet FDDI
4
Ethernet, FDDI
Protocols: UDP Protocols: UDP
- Connectionless
No state is maintained – No state is maintained – No setup time Light weight – Light-weight
- No Quality of Service
Postal Service Postal Service
– No guarantee delivery – No order delivery
TCP
- Connection Oriented
– State is maintained at routers – State is maintained at routers – Setup Handshake – Heavy-weight Heavy weight
- Quality of Service
– FIFO delivery – FIFO delivery – Flow Control – Error Recovery Error Recovery
- Mechanisms
– Timers Acknowledgements etc Timers, Acknowledgements, etc
6
Multicast: Overview Multicast: Overview
WAN
Broadcast
WAN
Unicast
WAN
Multicast
7
Multicast: Model Multicast: Model
- UDP class D address – No physical meaning
M lti t i f LAN
- Multicast is free on LANs
- An address defines a logical group
- A sender is oblivious to receivers
- Join/Leave operations
Join/Leave operations
- Tree Based Routing
8
Socket
- End-point for communication
N t k ti b d k t
- Network connections based on sockets
- Socket identified by
– Host address – numeric or name – Port number
- 0-1023 : well known services (e.g. http traffic on 80)
- 1024-49151: registered ports (less well known)
49152 65536: private applications or dynamic use
- 49152-65536: private applications or dynamic use
9
Socket communication
Listener Client N d t t k t Needs to create a socket to connect t li t i k t Needs to create a socket to listen to incoming connection requests to listening sockets
10
The Client/Server logic
Server Client
C t k t f li t i Create socket for listening incoming connections Create socket for connecting to Server Listen Request connection Accept and create thread Send/Receive message Send/Receive message
11
XVR functions
Server Client
N tC t Ch lTCP( ) NetCreateChannelTCP( ) NetConnectTCP( ) NetAcceptTCP ( ) Accept and create thread NetSendToTCP() / NetReceiveFromTCP() NetSendToTCP() / NetReceiveFromTCP()
12