| View previous topic :: View next topic |
| Author |
Message |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Tue Oct 28, 2008 5:02 pm Post subject: Learning Winsock |
|
|
I am trying to learn winsock 2 and need some good tut's. I am mainly trying to learn the winsock API for C++, but I also am going to learn it in ASM later.
If you have any good sites/pdf's/tuts or anything please share it.
I already have enough winsock knowlage to make a C++ network chat server and client (from scratch). So I mainly want more advanced texts, but I always like to review the basics!
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Tue Oct 28, 2008 5:20 pm Post subject: |
|
|
Check out the info on MSDN. It has a tutorial.
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish |
|
| Back to top |
|
 |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Tue Oct 28, 2008 5:48 pm Post subject: |
|
|
| I have been there, and thats a reference.
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Tue Oct 28, 2008 6:00 pm Post subject: |
|
|
http://msdn.microsoft.com/en-us/library/ms740632(VS.85).aspx
| Quote: |
Getting Started with Winsock
The following is a step-by-step guide to getting started with Windows Sockets programming. It is designed to provide an understanding of basic Winsock functions and data structures, and how they work together.
The client and server application that is used for illustration is a very basic client and server. More advanced code examples are included in the samples included with the Microsoft Windows Software Development Kit (SDK).
The first few steps are the same for both client and server applications.
* About Servers and Clients
* Creating a Basic Winsock Application
* Initializing Winsock
The following sections describe the remaining steps for creating a Winsock client application.
* Creating a Socket for the Client
* Connecting to a Socket
* Sending and Receiving Data on the Client
* Disconnecting the Client
The following sections describe the remaining steps for creating a Winsock server application.
* Creating a Socket for the Server
* Binding a Socket
* Listening on a Socket
* Accepting a Connection
* Receiving and Sending Data on the Server
* Disconnecting the Server
The complete source code for these basic examples.
* Complete Server and Client Code
|
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish |
|
| Back to top |
|
 |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Tue Oct 28, 2008 6:41 pm Post subject: |
|
|
| More advanced ones anyone?
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Tue Oct 28, 2008 8:46 pm Post subject: |
|
|
How advanced do you want? Did you look at the link I provided...
| Code: | Using Winsock
This section describes procedures and programming techniques employed with Winsock. It includes basic Winsock programming techniques, such as Getting Started With Winsock, as well as advanced techniques useful for experienced Winsock developers.
The following list describes the topics in this section:
* Getting Started With Winsock
* Secure Winsock Programming
* Porting Socket Applications to Winsock
* IPv6 Guide for Windows Sockets Applications
* High-performance Windows Sockets Applications
* Winsock Secure Socket Extensions
* Categorizing Layered Service Providers and Applications
* Multicast Programming
* Reliable Multicast Programming (PGM)
* Winsock Tracing
|
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish |
|
| Back to top |
|
 |
Chaosis13 Master Cheater
Reputation: 0
Joined: 14 Aug 2007 Posts: 372
|
Posted: Sat Nov 01, 2008 1:53 pm Post subject: |
|
|
I am never going to be happy with that, get over it.
ANYONE ELSE have any winsock guides, tuts, or anything. More adv stuff would be great.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Nov 01, 2008 2:16 pm Post subject: |
|
|
What are you attempting to do?
MSDN will be good enough for almost anything that you need to do.
_________________
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Sat Nov 01, 2008 9:18 pm Post subject: |
|
|
The MSDN link he provided explains everything about winsock in tuts.. as you want it..
it has sample source code to create everything using Winsock 2..
it has.. a TUT for creating these
| Code: |
The first few steps are the same for both client and server applications.
About Servers and Clients
Creating a Basic Winsock Application
Initializing Winsock
The following sections describe the remaining steps for creating a Winsock client application.
Creating a Socket for the Client
Connecting to a Socket
Sending and Receiving Data on the Client
Disconnecting the Client
The following sections describe the remaining steps for creating a Winsock server application.
Creating a Socket for the Server
Binding a Socket
Listening on a Socket
Accepting a Connection
Receiving and Sending Data on the Server
Disconnecting the Server
The complete source code for these basic examples.
Complete Server and Client Code
|
also look at the last one
COMPLETE SERVER and CLIENT CODE
complete source code.. on how to use winsock 2 for both server and client
http://msdn.microsoft.com/en-us/library/ms738545(VS.85).aspx
click the blue links
here is the source code from MSDN for making servers from winsock2
http://msdn.microsoft.com/en-us/library/ms737593(VS.85).aspx
but yes that server is only supporting one client.. then it calls closesocket() and doesn't accept new connections... but you could stop that with BASIC C++ programming skills called using Threading/Threads and loops for(; or while(1)
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Nov 02, 2008 3:34 am Post subject: |
|
|
| Chaosis13 wrote: | I am never going to be happy with that, get over it.
ANYONE ELSE have any winsock guides, tuts, or anything. More adv stuff would be great. |
I don't get why you're being upset? You're the stupid one who isn't searching.
You could atleast say thanks to him for god sake.
|
|
| Back to top |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Sun Nov 02, 2008 12:27 pm Post subject: |
|
|
| I dont know what your talking about by adv. That's all the information you need to get as far as you can. If you dont think it is, then you dont know what your talking about.
|
|
| Back to top |
|
 |
|