Youtube Link: https://www.youtube.com/watch?v=n4Clp-7HX5M Description: Reviews fix made to Tutorial 8.rar that I forgot to include in the video. Applies endianness that we learned in Tutorial 8 to the Send/Get Packet Type functions.
Tutorial 9 Pre-Tutorial Review
Spoiler:
Youtube Link: https://www.youtube.com/watch?v=DZ3g3FV9wQo Description: Reviews how to read/write from binary files using std::ifstream and std::ofstream and how to copy a file using these techniques. These will be used in Tutorial 9 for sending a file from the server to the client.
Youtube Link: https://youtu.be/Ut6pi9ZmrVU Description: Change server to use a vector of connections to allow more than 100 connections at once and address the issue of sending data to users that have already disconnected. (Note: Server most likely wont be able to handle that many clients properly using blocking sockets - this will be addressed later)
Solution Link: http://www.mediafire.com/download/7kd6y ... ial_11.rar
Set up server to have other people connect
Spoiler:
Youtube Link: https://www.youtube.com/watch?v=xikq1pO ... 7NzSlxlTKx Description: Explains how set up server/client so that other computers on router can connect or other computers from remote locations can connect to your server.
Solution Link: None
Youtube Link: https://www.youtube.com/watch?v=zdQDHCjJ7YQ Description: Many changes. Client now uses packet manager, changed how packet manager works to use shared_ptr of Packets, changed how packets worked to use vector of bytes instead of a char * to the buffer, cleaned up code, added m_ prefix to member variables, used const where applicable, changed from CreateThread to std::thread, no longer using deprecated functions, removed unnecessary includes, using shared_lock now for packetsender and processpacket, no longer using strange connection management, etc.
Solution Link: http://www.mediafire.com/file/cx1mxfl0f ... ial_13.rar
NONBLOCKING TUTORIALS LISTED BELOW
Tutorial 1
Spoiler:
Youtube Link: https://youtu.be/M4VFJ0hxPDg Description: Create basic nonblocking server that can accept connections and attempts to receive 4 bytes of data and display the data using std::cout. Can also handle if a client disconnects. Only utilizes the readfds FD_SET.
Solution Link: http://www.mediafire.com/file/y19zuyfe6 ... rial_1.rar
Youtube Link: https://youtu.be/P1fLN6AKLPE Description: Add handling for partial send/recv's, add TCPConnection class to store information about the current connection. Briefly review the process for how we will be handling sending/recv'ing differently on nonblocking on blocking.
Solution Link: http://www.mediafire.com/file/t5xght6gp ... rial_4.rar
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 3:23 pm
by adabo
Will definitely be keeping an eye on this. Thank you kindly!
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 3:47 pm
by adabo
Hmm, so I just watched the first tut and I'm wondering, is winsock what we use to send data in multiplayer games? I have no idea about networking, so I'm at your mercy of knowledge.
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 4:34 pm
by Pindrought
adabo wrote:Hmm, so I just watched the first tut and I'm wondering, is winsock what we use to send data in multiplayer games? I have no idea about networking, so I'm at your mercy of knowledge.
Winsock is a library used to send data over sockets for Windows platforms, so to answer your question yes. You will want to use a different networking library however for linux or apple systems since I don't think Winsock is cross platform.
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 6:54 pm
by LuisR14
but winsock contains functions that are cross platform, ..actually, winsock has its own functions which the cross platform functions are equivalents of
(pretty much you can create same app with such functions, only exception is those WSAStartup and WSACleanup functions, which is easy to exclude for non-windows apps anyways)
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 6:56 pm
by adabo
Oh wow, really? So windows games like Call of Duty, Age of Empires, WoW, all use winsock?
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 7:14 pm
by LuisR14
yea most likely
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 7:15 pm
by Pindrought
LuisR14 wrote:but winsock contains functions that are cross platform, ..actually, winsock has its own functions which the cross platform functions are equivalents of
(pretty much you can create same app with such functions, only exception is those WSAStartup and WSACleanup functions, which is easy to exclude for non-windows apps anyways)
Thanks for the clarification LuisR14. I wasn't really sure myself of how it worked when it came to cross platform implementations.
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 7:18 pm
by LuisR14
no problemo
Re: C++ Winsock Networking Tutorials [2-22-2016]
Posted: February 22nd, 2016, 8:38 pm
by MrGodin
Hey, nice to see you doing these again . I have a question, does the lib work on x64 or do you need a different lib ?.