Reputation: 1057
I'm able to setup a TCP connection between a client and a server, but just have a question about the setup for a UDP connection.
For TCP I used the following format
CLIENT SERVER
------ ------
WSAStartup() WSAStartup()
s=socket(x, y, z) s=socket(x, y, z)
- bind()
- listen()
connect() accept()
send() -
- recv()
closesocket(s) closesocket(s)
WSAcleanup() WSACleanup()
Now my question is for the UDP setup. Since it is connectionless, would this be the right setup?
CLIENT SERVER
------ ------
WSAStartup() WSAStartup()
s=socket(x, y, z) s=socket(x, y, z)
bind() bind()
sendto() -
- recvfrom()
closesocket(s) closesocket(s)
WSAcleanup() WSACleanup()
Upvotes: 0
Views: 1260